Skip to content

Commit

Permalink
Bugfix: proper tail call
Browse files Browse the repository at this point in the history
rt.Call already runs the continuation, see
arnodel/golua#97
  • Loading branch information
TheCount committed Feb 1, 2023
1 parent 9aaa6e6 commit fc3db1d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,5 @@ func tailMethodCall(
if err != nil {
return nil, err
}
err = rt.Call(t, m, append([]rt.Value{obj}, args...), c.Next())
return c.Next(), err
return nil, rt.Call(t, m, append([]rt.Value{obj}, args...), c.Next())
}

0 comments on commit fc3db1d

Please sign in to comment.