Fix math.pow() for custom platforms.

This commit is contained in:
James Roseborough
2007-12-12 19:11:25 +00:00
parent 6569563ddc
commit eef737fde1

View File

@@ -81,8 +81,9 @@ public class LDouble extends LNumber {
case Lua.OP_POW: {
// allow platform to override math.pow()
LValue result = Platform.getInstance().mathPow(lhs, rhs);
if ( result == null )
return new LDouble( dpow( lhs, rhs ) );
return (result != null?
result:
new LDouble( dpow( lhs, rhs ) ));
}
}
LuaState.vmerror( "bad bin opcode" );