summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2022-12-24 03:11:03 +0100
committerThomas Voss <mail@thomasvoss.com> 2022-12-24 03:11:03 +0100
commit6cc3edc596d9ab925a6496d62202445719eddc7c (patch)
treeb2d92cd13364468fdcc23787151e9e4a1172ee3f
parent6dc60bf49d2c43c701c6f578711d91e51dacb9cf (diff)
Fix capacity bug
-rw-r--r--src/gevector.h2
1 files changed, 1 insertions, 1 deletions
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)) \