I'm pretty sure that, when resizing a table, we want to copy the non-null nodes rather than the null ones.

main
rfm 16 years ago
parent 45b2641793
commit 5786a73e46

@ -182,7 +182,7 @@ static int PREFIX(_table_resize)(PREFIX(_table) *table)
for (uint32_t i=0 ; i<copy->table_size ; i++) for (uint32_t i=0 ; i<copy->table_size ; i++)
{ {
MAP_TABLE_VALUE_TYPE value = copy->table[i].value; MAP_TABLE_VALUE_TYPE value = copy->table[i].value;
if (MAP_TABLE_VALUE_NULL(value)) if (!MAP_TABLE_VALUE_NULL(value))
{ {
PREFIX(_insert)(table, value); PREFIX(_insert)(table, value);
} }

Loading…
Cancel
Save