diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/parser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parser.c b/src/parser.c index 46a1fb6..c4b9c8e 100644 --- a/src/parser.c +++ b/src/parser.c @@ -80,7 +80,9 @@ ast_t parsetoks(lexemes_t toks, aux_t *aux) { ast_t ast = mkast(); - aux->buf = bufalloc(NULL, aux->cap = AUX_DFLT_CAP, sizeof(*aux->buf)); + aux->len = 0; + aux->cap = AUX_DFLT_CAP; + aux->buf = bufalloc(NULL, aux->cap, sizeof(*aux->buf)); for (;;) { (void)parsedecl(&ast, aux, toks, true); |