Fix 1e parsing

Fix 1e5, 1e-5 evaluated as Infinity (https://github.com/HaxeFoundation/hscript/pull/132)
This commit is contained in:
Jaime Humberto Macias Bustamante
2025-04-10 14:51:36 -07:00
parent 6622220415
commit 34b07378fd
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -1943,6 +1943,8 @@ class Parser {
}
if( pow == null )
invalidChar(char);
if( exp == 0 )
exp = 10;
return TConst(CFloat((Math.pow(10, pow) / exp) * n * 10));
case ".".code:
if( exp > 0 ) {