Fix math.pow() for custom platforms.
This commit is contained in:
@@ -81,8 +81,9 @@ public class LDouble extends LNumber {
|
|||||||
case Lua.OP_POW: {
|
case Lua.OP_POW: {
|
||||||
// allow platform to override math.pow()
|
// allow platform to override math.pow()
|
||||||
LValue result = Platform.getInstance().mathPow(lhs, rhs);
|
LValue result = Platform.getInstance().mathPow(lhs, rhs);
|
||||||
if ( result == null )
|
return (result != null?
|
||||||
return new LDouble( dpow( lhs, rhs ) );
|
result:
|
||||||
|
new LDouble( dpow( lhs, rhs ) ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LuaState.vmerror( "bad bin opcode" );
|
LuaState.vmerror( "bad bin opcode" );
|
||||||
|
|||||||
Reference in New Issue
Block a user