mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
less confusing
This commit is contained in:
parent
802005f571
commit
a0fa90ddd5
1 changed files with 5 additions and 4 deletions
9
parser.c
9
parser.c
|
@ -2779,7 +2779,6 @@ static bool parse_for_go(parser_t *parser, ast_block *block, ast_expression **ou
|
|||
ast_expression *initexpr, *cond, *increment, *ontrue;
|
||||
ast_value *typevar;
|
||||
|
||||
bool retval = true;
|
||||
bool ifnot = false;
|
||||
|
||||
lex_ctx ctx = parser_ctx(parser);
|
||||
|
@ -2879,9 +2878,11 @@ static bool parse_for_go(parser_t *parser, ast_block *block, ast_expression **ou
|
|||
aloop = ast_loop_new(ctx, initexpr, cond, ifnot, NULL, false, increment, ontrue);
|
||||
*out = (ast_expression*)aloop;
|
||||
|
||||
if (!parser_leaveblock(parser))
|
||||
retval = false;
|
||||
return retval;
|
||||
if (!parser_leaveblock(parser)) {
|
||||
ast_delete(aloop);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
onerr:
|
||||
if (initexpr) ast_unref(initexpr);
|
||||
if (cond) ast_unref(cond);
|
||||
|
|
Loading…
Reference in a new issue