🐛 fix bug of forindex/foreach, which will cause SIGSEGV.

example:

var a=func{};
forindex(a();[0,1,2]);
This commit is contained in:
ValKmjolnir 2022-06-11 13:55:10 +08:00
parent 21b345af27
commit 0515e388da
1 changed files with 1 additions and 0 deletions

View File

@ -946,6 +946,7 @@ nasal_ast nasal_parse::iter_gen()
match(tok_id); match(tok_id);
while(is_call(tokens[ptr].type)) while(is_call(tokens[ptr].type))
node.add(call_scalar()); node.add(call_scalar());
check_memory_reachable(node);
} }
return node; return node;
} }