diff options
author | Thomas Voss <mail@thomasvoss.com> | 2022-12-24 03:11:03 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2022-12-24 03:11:03 +0100 |
commit | 6cc3edc596d9ab925a6496d62202445719eddc7c (patch) | |
tree | b2d92cd13364468fdcc23787151e9e4a1172ee3f /src | |
parent | 6dc60bf49d2c43c701c6f578711d91e51dacb9cf (diff) |
Fix capacity bug
Diffstat (limited to 'src')
-rw-r--r-- | src/gevector.h | 2 |
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)) \ |