Fix calling convention by managing top of stack and adjusting on way in and out of function calls.
This commit is contained in:
@@ -17,8 +17,8 @@ public class Closure extends LValue {
|
||||
|
||||
|
||||
// perform a lua call
|
||||
public int luaStackCall(StackState state, int base, int nargs) {
|
||||
state.clear( base+1+nargs, p.numparams-nargs );
|
||||
return state.vmExecute( this, base+1 );
|
||||
public void luaStackCall(StackState state, int base) {
|
||||
state.adjustTop( base+1+p.numparams );
|
||||
state.vmExecute( this, base+1 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user