fixed exp overflow with constant floats and a lot of numbers after dot

This commit is contained in:
Nicolas Cannasse
2012-02-16 16:18:16 +00:00
parent 1647fe8035
commit 676d636ce7
+2 -2
View File
@@ -813,7 +813,7 @@ class Parser {
#end
case 48,49,50,51,52,53,54,55,56,57: // 0...9
var n = (char - 48) * 1.0;
var exp = 0;
var exp = 0.;
while( true ) {
char = readChar();
exp *= 10;
@@ -830,7 +830,7 @@ class Parser {
}
invalidChar(char);
}
exp = 1;
exp = 1.;
case 120: // x
if( n > 0 || exp > 0 )
invalidChar(char);