fix calling on wrong stack

This commit is contained in:
2023-03-08 23:48:54 +00:00
parent bfaf3f1c4f
commit 33b3e66ab9

View File

@@ -84,7 +84,7 @@ func runCall(c call, stack stack) (any, ArErr) {
for i, param := range x.params {
level[param] = args[i]
}
resp, err := runVal(x.run, append(stack, level))
resp, err := runVal(x.run, append(x.stack, level))
return resp, err
}
return nil, ArErr{"Runtime Error", "type '" + typeof(callable) + "' is not callable", c.line, c.path, c.code, true}