variable.c (iv_rehash): fixed removed check

This check removed in 70cc2cc was necessary.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-05-17 09:52:00 +09:00
parent 49927a7035
commit cead78b394
+1
View File
@@ -51,6 +51,7 @@ iv_rehash(mrb_state *mrb, iv_tbl *t)
t->ptr = (mrb_value*)mrb_calloc(mrb, sizeof(mrb_value)+sizeof(mrb_sym), new_alloc);
t->size = 0;
t->alloc = new_alloc;
if (old_alloc == 0) return;
mrb_sym *keys = (mrb_sym*)&old_ptr[old_alloc];
mrb_value *vals = old_ptr;