fix bug in repeated function calls

This commit is contained in:
Aidan 2020-07-08 21:09:24 -07:00
parent 93cd5c5a48
commit 81d299aa5e
No known key found for this signature in database
GPG key ID: 327711E983899316
3 changed files with 20 additions and 11 deletions

View file

@ -60,8 +60,8 @@ func decl_func(input *ast.Token, vars ast.VarTable, funcs ast.FuncTable) *ast.To
ASTSYNCSTATE := ast.SyncTablesWithOSEnviron
inner := func(in *ast.Token, vt ast.VarTable, ft ast.FuncTable) *ast.Token {
in = in.Eval(ft, vt, false)
if in == nil {
temp := in.Eval(ft, vt, false)
if temp == nil {
log.Log(log.ERR,
"error parsing arguments",
name.Value())
@ -70,7 +70,7 @@ func decl_func(input *ast.Token, vars ast.VarTable, funcs ast.FuncTable) *ast.To
ast.SyncTablesWithOSEnviron = false
key_iter := args.Expand()
val_iter := in
val_iter := temp
for key_iter != nil {
if val_iter == nil {