提交 a2444346 编写于 作者: B Behdad Esfahbod

[map] Fix resize

上级 efbab6ba
...@@ -110,6 +110,7 @@ struct hb_map_t ...@@ -110,6 +110,7 @@ struct hb_map_t
items = new_items; items = new_items;
/* Insert back old items. */ /* Insert back old items. */
if (old_items)
for (unsigned int i = 0; i < old_size; i++) for (unsigned int i = 0; i < old_size; i++)
if (old_items[i].key != INVALID && old_items[i].value != INVALID) if (old_items[i].key != INVALID && old_items[i].value != INVALID)
set (old_items[i].key, old_items[i].value); set (old_items[i].key, old_items[i].value);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册