Make parser_find_local only actually search locals

Fixes #163
Signed-off-by: Wolfgang Bumiller <wry.git@bumiller.com>
This commit is contained in:
Wolfgang Bumiller 2018-01-14 09:31:45 +01:00
parent e006aa8238
commit e920766b10

View 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;
}