From 53d74e58f46ec54b8d9b147876275532d02d97ed Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 25 Jul 2020 16:55:11 +0200 Subject: Fix incorrect alloc size of ParserFileScopeReference --- src/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 204e391..d0b3c0a 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1096,7 +1096,7 @@ void parser_queue_file(Parser *self, BufferView path, ParserFileScopeReference * throw(PARSER_ERR); } - throw_if_error(arena_allocator_alloc(self->allocator, sizeof(ParserFileScopeReference*), (void**)parser_file_scope)); + throw_if_error(arena_allocator_alloc(self->allocator, sizeof(ParserFileScopeReference), (void**)parser_file_scope)); (*parser_file_scope)->file_scope_ref = file_scope; (*parser_file_scope)->import_index = num_imports; throw_if_error(buffer_append(&self->imports, parser_file_scope, sizeof(ParserFileScopeReference*))); -- cgit v1.2.3