Fix select for "#" argument

This commit is contained in:
James Roseborough
2007-11-05 19:16:08 +00:00
parent cce33612ce
commit ec5068a96e
3 changed files with 3 additions and 1 deletions

View File

@@ -374,7 +374,6 @@ public class LuaCompat extends LFunction {
} else if ( arg.toJavaString().equals( "#" ) ) { } else if ( arg.toJavaString().equals( "#" ) ) {
setResult( vm, LInteger.valueOf( vm.gettop() - 2 ) ); setResult( vm, LInteger.valueOf( vm.gettop() - 2 ) );
} }
vm.settop(0);
} }
private LValue abs( final LValue v ) { private LValue abs( final LValue v ) {

View File

@@ -24,5 +24,8 @@ print( select(3, "a", "b", "c"))
print((select(4, "a", "b", "c"))) print((select(4, "a", "b", "c")))
print( select(4, "a", "b", "c")) print( select(4, "a", "b", "c"))
print( select("#") )
print( select("#", "a") )
print( select("#", "a", "b") )
-- f("hello", "world") -- f("hello", "world")
-- g(1, 2, 3, 4, 5, 6, 7) -- g(1, 2, 3, 4, 5, 6, 7)

Binary file not shown.