Skip to content

Commit 846c3b8

Browse files
committed
Merge pull request #795 from Microsoft/revert-783-jspaser-parse-fix
Revert "Fix potential parse error for large hex numbers"
2 parents ff1a23e + b3f00da commit 846c3b8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Nodejs/Product/Analysis/JavaScript/jsparser.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3905,13 +3905,7 @@ private bool ConvertNumericLiteralToDouble(string str, bool isInteger, out doubl
39053905
}
39063906

39073907
// parse the number as a hex integer, converted to a double
3908-
long hexValue;
3909-
if (Int64.TryParse(str.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hexValue)) {
3910-
doubleValue = hexValue;
3911-
} else {
3912-
doubleValue = 0;
3913-
return false;
3914-
}
3908+
doubleValue = (double)System.Convert.ToInt64(str, 16);
39153909
}
39163910
else
39173911
{

0 commit comments

Comments
 (0)