From 8aa57dd5a87b454ce99a336ed86a6bd4d6f77c1e Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sat, 23 Oct 2021 20:30:56 +0200 Subject: Add string and symbol types --- src/bytecode/darray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bytecode/darray.h') diff --git a/src/bytecode/darray.h b/src/bytecode/darray.h index e8cdc36..fa4e293 100755 --- a/src/bytecode/darray.h +++ b/src/bytecode/darray.h @@ -63,7 +63,7 @@ static inline char * _array_insert(char *arr, const char *src, size_t n_bytes, size_t type_size) { ArrayHeader *head = array_head(arr); size_t new_size = n_bytes + head->size; - if (new_size >= head->cap * type_size) { + if (new_size > head->cap * type_size) { if (head->cap == 0) { head->cap = 1; } -- cgit v1.2.1