From e814a3693f9efbdd00113de4dd5937acd97bc486 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 15 Nov 2021 17:26:01 +0000 Subject: Improve usage of `file_id` --- src/ptr_set.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ptr_set.cpp') diff --git a/src/ptr_set.cpp b/src/ptr_set.cpp index 8dd3cb4dc..ca7df3b53 100644 --- a/src/ptr_set.cpp +++ b/src/ptr_set.cpp @@ -24,7 +24,9 @@ template void ptr_set_reserve(PtrSet *h, isize cap); template void ptr_set_init(PtrSet *s, gbAllocator a, isize capacity) { - capacity = next_pow2_isize(gb_max(16, capacity)); + if (capacity != 0) { + capacity = next_pow2_isize(gb_max(16, capacity)); + } slice_init(&s->hashes, a, capacity); array_init(&s->entries, a, 0, capacity); -- cgit v1.2.3