Improve vararg handling logic.

This commit is contained in:
James Roseborough
2007-06-12 06:22:55 +00:00
parent da6f63bb3d
commit b6f123d5e5
3 changed files with 21 additions and 4 deletions

View File

@@ -18,7 +18,8 @@ public class Closure extends LValue {
// perform a lua call
public void luaStackCall(StackState state, int base) {
state.adjustTop( base+1+p.numparams );
if ( (! p.is_vararg) || (state.top < base+1+p.numparams) )
state.adjustTop( base+1+p.numparams );
state.vmExecute( this, base+1 );
}
}