This commit is contained in:
Daniel Lemire 2025-03-10 09:02:38 -04:00
parent b29208f93d
commit c6732cd28b

View File

@ -304,7 +304,8 @@ parse_number_string(UC const *p, UC const *pend,
return report_parse_error<UC>(p, return report_parse_error<UC>(p,
parse_error::missing_integer_after_sign); parse_error::missing_integer_after_sign);
} }
} else { }
else {
if (!is_integer(*p) && if (!is_integer(*p) &&
(*p != (*p !=
decimal_point)) { // a sign must be followed by an integer or the dot decimal_point)) { // a sign must be followed by an integer or the dot
@ -363,8 +364,8 @@ parse_number_string(UC const *p, UC const *pend,
return report_parse_error<UC>(p, return report_parse_error<UC>(p,
parse_error::no_digits_in_fractional_part); parse_error::no_digits_in_fractional_part);
} }
} else if (digit_count == }
0) { // we must have encountered at least one integer! else if (digit_count == 0) { // we must have encountered at least one integer!
return report_parse_error<UC>(p, parse_error::no_digits_in_mantissa); return report_parse_error<UC>(p, parse_error::no_digits_in_mantissa);
} }
int64_t exp_number = 0; // explicit exponential part int64_t exp_number = 0; // explicit exponential part