return nil when remove removes nothing

This commit is contained in:
James Roseborough
2008-05-24 00:02:48 +00:00
parent d383b4703f
commit 2583228b87

View File

@@ -176,9 +176,7 @@ public class TableLib extends LFunction {
LTable table = vm.totable(2);
int pos = (n>=3? vm.tointeger(3): 0);
vm.resettop();
LValue v = table.luaRemovePos(pos);
if ( ! v.isNil() )
vm.pushlvalue( v );
vm.pushlvalue( table.luaRemovePos(pos) );
break;
}