mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 22:31:36 +00:00
Don't add redeclared globals a second time
This commit is contained in:
parent
7c241da548
commit
0af62801f4
1 changed files with 9 additions and 0 deletions
9
parser.c
9
parser.c
|
@ -3739,6 +3739,15 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
|
|||
retval = false;
|
||||
goto cleanup;
|
||||
}
|
||||
proto = (ast_value*)old;
|
||||
if (!ast_istype(old, ast_value)) {
|
||||
parseerror(parser, "internal error: not an ast_value");
|
||||
retval = false;
|
||||
proto = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
ast_delete(var);
|
||||
var = proto;
|
||||
}
|
||||
}
|
||||
if (opts_standard == COMPILER_QCC &&
|
||||
|
|
Loading…
Reference in a new issue