diff options
Diffstat (limited to 'src/bytecode/darray.h')
-rwxr-xr-x | src/bytecode/darray.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
63 | char * _array_insert(char *arr, const char *src, size_t n_bytes, size_t type_size) { | 63 | char * _array_insert(char *arr, const char *src, size_t n_bytes, size_t type_size) { |
64 | ArrayHeader *head = array_head(arr); | 64 | ArrayHeader *head = array_head(arr); |
65 | size_t new_size = n_bytes + head->size; | 65 | size_t new_size = n_bytes + head->size; |
66 | if (new_size >= head->cap * type_size) { | 66 | if (new_size > head->cap * type_size) { |
67 | if (head->cap == 0) { | 67 | if (head->cap == 0) { |
68 | head->cap = 1; | 68 | head->cap = 1; |
69 | } | 69 | } |