mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
It was too early to check key for undef; ref #4534
This commit is contained in:
+1
-1
@@ -543,10 +543,10 @@ ht_copy(mrb_state *mrb, htable *t)
|
||||
mrb_value key = seg->e[i].key;
|
||||
mrb_value val = seg->e[i].val;
|
||||
|
||||
if (mrb_undef_p(key)) continue; /* skip deleted key */
|
||||
if ((seg->next == NULL) && (i >= t->last_len)) {
|
||||
return t2;
|
||||
}
|
||||
if (mrb_undef_p(key)) continue; /* skip deleted key */
|
||||
ht_put(mrb, t2, key, val);
|
||||
}
|
||||
seg = seg->next;
|
||||
|
||||
Reference in New Issue
Block a user