From 6cc3edc596d9ab925a6496d62202445719eddc7c Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 24 Dec 2022 03:11:03 +0100 Subject: Fix capacity bug --- src/gevector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gevector.h b/src/gevector.h index cf0b6f9..ce86599 100644 --- a/src/gevector.h +++ b/src/gevector.h @@ -22,7 +22,7 @@ { \ *vec = (struct n) { \ .gfactor = gfactor == 0 ? 1.5f : gfactor, \ - .capacity = capacity, \ + .capacity = capacity == 0 ? 16 : capacity, \ .size = 0, \ .items = calloc(capacity == 0 ? 16 : capacity, \ sizeof(t)) \ -- cgit v1.2.3