Fix nan-related error in constant folding logic that was failing on some JVMs

This commit is contained in:
James Roseborough
2010-11-19 19:46:34 +00:00
parent f9b3180ede
commit e267ffa5a7
2 changed files with 5 additions and 1 deletions

View File

@@ -861,7 +861,7 @@ public class FuncState extends LuaC {
r = null;
break;
}
if (Double.NaN == r.todouble())
if ( Double.isNaN(r.todouble()) )
return false; /* do not attempt to produce NaN */
e1.u.setNval( r );
return true;