map
map copied to clipboard
map_deinit crash after map_init without add any values
map_init(&m);
map_deinit(&m); // crash
map_init
will set m->nbuckets
to 0, how could you step into the while loop without any map_set_ operations?
#define map_init(m)\
memset(m, 0, sizeof(*(m)))