aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode/darray.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-10-23 20:30:56 +0200
committerBad Diode <bd@badd10de.dev>2021-10-23 20:30:56 +0200
commit8aa57dd5a87b454ce99a336ed86a6bd4d6f77c1e (patch)
treed432226eba0aa3218a64314f702d17ac155a1f22 /src/bytecode/darray.h
parentb271ce1d9098c9057fccdca6eba6b0ee0a5245a2 (diff)
downloadbdl-8aa57dd5a87b454ce99a336ed86a6bd4d6f77c1e.tar.gz
bdl-8aa57dd5a87b454ce99a336ed86a6bd4d6f77c1e.zip
Add string and symbol types
Diffstat (limited to 'src/bytecode/darray.h')
-rwxr-xr-xsrc/bytecode/darray.h2
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
63char * _array_insert(char *arr, const char *src, size_t n_bytes, size_t type_size) { 63char * _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 }