fix a bug in __mg_map_insert

This commit is contained in:
Vincent Wei
2020-02-26 22:13:42 +08:00
parent e76dcef46e
commit ba65912bb1

View File

@@ -246,7 +246,7 @@ int __mg_map_insert (map_t* map, const void* key, const void* val)
if (map->comp_key)
ret = map->comp_key (key, (*pentry)->key);
else
ret = (int)((intptr_t)key - (intptr_t)entry->key);
ret = (int)((intptr_t)key - (intptr_t)(*pentry)->key);
parent = *pentry;
if (ret < 0)