[NOTHING CHANGED] Assorted fixes #48

Closed
asiekierka wants to merge 61 commits from asiekierka/master into master
Showing only changes of commit b121b65151 - Show all commits

View File

@@ -231,6 +231,8 @@ public class MathLib extends TwoArgFunction {
static final class fmod extends TwoArgFunction {
@Override
public LuaValue call(LuaValue xv, LuaValue yv) {
if (yv.checkdouble() == 0.0d)
return LuaDouble.NAN;
if (xv.islong() && yv.islong()) {
return valueOf(xv.tolong()%yv.tolong());
}