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

[map] Fix resize

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