aboutsummaryrefslogtreecommitdiff
path: root/src/std/hash_map.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-21 07:02:02 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commitdf640dc7f55fef962b598562e10d8dd4d60fedc0 (patch)
tree2dfac59fa992ef1b42c3cc2ce9bc25c067f2ba82 /src/std/hash_map.c
parentc68fe7634341e97c3246b627a20fa9487586ffcb (diff)
Code cleanup in ssa/bytecode. Remove ugly memcpy
Diffstat (limited to 'src/std/hash_map.c')
-rw-r--r--src/std/hash_map.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/std/hash_map.c b/src/std/hash_map.c
index 48e9e38..98ebf40 100644
--- a/src/std/hash_map.c
+++ b/src/std/hash_map.c
@@ -85,6 +85,7 @@ int hash_map_init(HashMap *self, ArenaAllocator *allocator, usize value_type_siz
return_if_error(buffer_init(&self->buckets, self->allocator));
assert(self->buckets.size == 0);
return_if_error(buffer_append_empty(&self->buckets, sizeof(HashMapBucket) * HASH_MAP_INITIAL_SIZE));
+ assert(HASH_MAP_INITIAL_SIZE != 0);
am_memset(self->buckets.data, 0, self->buckets.size);
return 0;
}