]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
ast_return needs the correct context...
authorWolfgang Bumiller <blub@speed.at>
Thu, 20 Dec 2012 14:01:19 +0000 (15:01 +0100)
committerWolfgang Bumiller <blub@speed.at>
Thu, 20 Dec 2012 14:01:19 +0000 (15:01 +0100)
parser.c

index 6f2ddd81c2f38e24c899e4c71dc6bd1d37cd43f9..8d8e5a432baa030c60dbd836b9ff6cb9a6225beb 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -2156,7 +2156,7 @@ static bool parse_return(parser_t *parser, ast_block *block, ast_expression **ou
             parseerror(parser, "return with invalid expression");
         }
 
-        ret = ast_return_new(exp->expression.node.context, exp);
+        ret = ast_return_new(ctx, exp);
         if (!ret) {
             ast_delete(exp);
             return false;