mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-23 19:21:29 +00:00
Use the current context, not the one from a NULL value... for ast_return
This commit is contained in:
parent
701c387dbf
commit
586bb07c4d
1 changed files with 1 additions and 1 deletions
2
parser.c
2
parser.c
|
@ -1618,7 +1618,7 @@ static bool parser_parse_statement(parser_t *parser, ast_block *block, ast_expre
|
|||
if (expected->expression.next->expression.vtype != TYPE_VOID) {
|
||||
parseerror(parser, "return without value");
|
||||
}
|
||||
ret = ast_return_new(exp->expression.node.context, NULL);
|
||||
ret = ast_return_new(parser_ctx(parser), NULL);
|
||||
}
|
||||
*out = (ast_expression*)ret;
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue