diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-29 13:56:45 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-29 13:56:45 +0100 |
| commit | fbd27d7c459bab630af56ba0bf608f9d51109a07 (patch) | |
| tree | c0364e48896632ab026ffefb8719170e5c64ecc3 /src/parser.cpp | |
| parent | 3546391311d84376a758ee0fcc806e192d6a18ce (diff) | |
Fix map internal type generation
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 3612efe64..3b4155fb9 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2231,10 +2231,9 @@ AstNode *parse_operand(AstFile *f, bool lhs) { // NOTE(bill): Allow neighbouring string literals to be merge together to // become one big string String s = f->curr_token.string; - Array<u8> data; - array_init(&data, heap_allocator(), token.string.len+s.len); + Array<u8> data = {}; + array_init_count(&data, heap_allocator(), token.string.len+s.len); gb_memmove(data.data, token.string.text, token.string.len); - data.count += token.string.len; while (f->curr_token.kind == Token_String) { String s = f->curr_token.string; |