mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 22:31:36 +00:00
Fix for loops
This commit is contained in:
parent
b640049912
commit
41a76ab91d
1 changed files with 5 additions and 1 deletions
6
parser.c
6
parser.c
|
@ -2595,6 +2595,11 @@ static bool parse_for_go(parser_t *parser, ast_block *block, ast_expression **ou
|
|||
goto onerr;
|
||||
}
|
||||
|
||||
if (!parser_next(parser)) {
|
||||
parseerror(parser, "expected for-loop condition");
|
||||
goto onerr;
|
||||
}
|
||||
} else {
|
||||
if (!parser_next(parser)) {
|
||||
parseerror(parser, "expected for-loop condition");
|
||||
goto onerr;
|
||||
|
@ -2607,7 +2612,6 @@ static bool parse_for_go(parser_t *parser, ast_block *block, ast_expression **ou
|
|||
if (!cond)
|
||||
goto onerr;
|
||||
}
|
||||
|
||||
/* move on to incrementor */
|
||||
if (parser->tok != ';') {
|
||||
parseerror(parser, "expected semicolon after for-loop initializer");
|
||||
|
|
Loading…
Reference in a new issue