Skip to content

Commit

Permalink
Merge pull request #795 from Microsoft/revert-783-jspaser-parse-fix
Browse files Browse the repository at this point in the history
Revert "Fix potential parse error for large hex numbers"
  • Loading branch information
mousetraps committed Mar 30, 2016
2 parents ff1a23e + b3f00da commit 846c3b8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Nodejs/Product/Analysis/JavaScript/jsparser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3905,13 +3905,7 @@ private bool ConvertNumericLiteralToDouble(string str, bool isInteger, out doubl
}

// parse the number as a hex integer, converted to a double
long hexValue;
if (Int64.TryParse(str.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hexValue)) {
doubleValue = hexValue;
} else {
doubleValue = 0;
return false;
}
doubleValue = (double)System.Convert.ToInt64(str, 16);
}
else
{
Expand Down

0 comments on commit 846c3b8

Please sign in to comment.