diff --git a/hashmap.c b/hashmap.c index fa21374..6633e35 100644 --- a/hashmap.c +++ b/hashmap.c @@ -206,9 +206,10 @@ void hashmap_clear(struct hashmap *map, bool update_cap) { static bool resize(struct hashmap *map, size_t new_cap) { - struct hashmap *map2 = hashmap_new(map->elsize, new_cap, map->seed1, - map->seed1, map->hash, map->compare, - map->elfree, map->udata); + struct hashmap *map2 = hashmap_new_with_allocator(map->malloc, map->realloc, map->free, + map->elsize, new_cap, map->seed0, + map->seed1, map->hash, map->compare, + map->elfree, map->udata); if (!map2) { return false; }