]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Set the output to NULL always before parsing stuff
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 19:48:06 +0000 (20:48 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 19:48:06 +0000 (20:48 +0100)
parser.c

index 8be7e3001e5c22dcd295d0b1a1d2d86df512b3aa..752d62a2ad3c5358e119facce38d7aa5c6ca2a69 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -2230,6 +2230,8 @@ static bool parse_switch(parser_t *parser, ast_block *block, ast_expression **ou
 static bool parse_statement(parser_t *parser, ast_block *block, ast_expression **out, bool allow_cases)
 {
     ast_value *typevar = NULL;
+    *out = NULL;
+
     if (parser->tok == TOKEN_IDENT)
         typevar = parser_find_typedef(parser, parser_tokval(parser), 0);