From f4864fd5ac7d21979a6ece8c5ad7e659ebcd33a8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 19 Jul 2012 19:55:25 +0200 Subject: [PATCH] null-init parser_t, add a function member to it --- parser.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parser.c b/parser.c index 5e42997..d086219 100644 --- a/parser.c +++ b/parser.c @@ -10,6 +10,8 @@ typedef struct { MEM_VECTOR_MAKE(ast_value*, globals); MEM_VECTOR_MAKE(ast_function*, functions); + + ast_function *function; } parser_t; MEM_VEC_FUNCTIONS(parser_t, ast_value*, globals) @@ -275,6 +277,8 @@ bool parser_compile(const char *filename) if (!parser) return false; + memset(&parser, 0, sizeof(parser)); + MEM_VECTOR_INIT(parser, globals); parser->lex = lex_open(filename);