aboutsummaryrefslogtreecommitdiff
path: root/src/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hash.c b/src/hash.c
index 44b657f..a45ab54 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -60,7 +60,7 @@ void *hash_init(size_t sz, unsigned (*hash_fn)(const void*),
int (*compare_keys)(const void*, const void*))
{
struct hash_map *ret = calloc(sizeof(struct hash_map), 1);
- ret->table = calloc(sizeof(struct hash_node), sz);
+ ret->table = calloc(sz, sizeof(struct hash_node*));
ret->table_sz = sz;
ret->hash = hash_fn;
ret->compare = compare_keys;