mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
allow initializing shadowed locals outside of -std=gmqcc - in this case it becomes a regular assignment to the old declaration which is consistent with fteqcc
This commit is contained in:
parent
71e7db63aa
commit
494c30a239
1 changed files with 6 additions and 2 deletions
8
parser.c
8
parser.c
|
@ -5112,8 +5112,12 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
|
|||
}
|
||||
if (OPTS_OPTION_U32(OPTION_STANDARD) != COMPILER_GMQCC) {
|
||||
ast_delete(var);
|
||||
var = NULL;
|
||||
goto skipvar;
|
||||
if (ast_istype(old, ast_value))
|
||||
var = (ast_value*)old;
|
||||
else {
|
||||
var = NULL;
|
||||
goto skipvar;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue