]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Make parser_find_local only actually search locals
authorWolfgang Bumiller <wry.git@bumiller.com>
Sun, 14 Jan 2018 08:31:45 +0000 (09:31 +0100)
committerWolfgang Bumiller <wry.git@bumiller.com>
Sun, 14 Jan 2018 08:33:05 +0000 (09:33 +0100)
Fixes #163
Signed-off-by: Wolfgang Bumiller <wry.git@bumiller.com>
parser.cpp

index 1404273735d83f2e1f2c583e5d4905b3231008d3..c795e40a39c9c6dd6e8354b5a76e6d83ea394c0e 100644 (file)
@@ -156,7 +156,7 @@ static ast_expression* parser_find_var(parser_t *parser, const char *name)
 {
     bool dummy;
     ast_expression *v;
-    v         = parser_find_local(parser, name, 0, &dummy);
+    v         = parser_find_local(parser, name, PARSER_HT_LOCALS, &dummy);
     if (!v) v = parser_find_global(parser, name);
     return v;
 }