Commit 126e62ed authored by miloyip's avatar miloyip

Fix #104 ParseNumberHandler fails on 32-bit

Use a tighter bound.
parent 143bb83e
......@@ -775,7 +775,7 @@ private:
if (useDouble) {
d = (double)i64;
while (s.Peek() >= '0' && s.Peek() <= '9') {
if (d >= 1E307)
if (d >= 1.7976931348623157e307) // DBL_MAX / 10.0
RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, s.Tell());
d = d * 10 + (s.Take() - '0');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment