mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-07 01:06:48 +08:00
fix for the parse_number_string
This commit is contained in:
parent
f14d482767
commit
7bac32408e
@ -473,13 +473,13 @@ parse_number_string(UC const *p, UC const *pend,
|
||||
// We need to be mindful of the case where we only have zeroes...
|
||||
// E.g., 0.000000000...000.
|
||||
UC const *start = start_digits;
|
||||
do { // we already have some numbers, so we can skip first check safely
|
||||
if ((*start == UC('0') || *start == options.decimal_point)) {
|
||||
if (*start == UC('0')) {
|
||||
--digit_count;
|
||||
}
|
||||
while ((start != pend) &&
|
||||
(*start == UC('0') || *start == options.decimal_point)) {
|
||||
if (*start == UC('0')) {
|
||||
--digit_count;
|
||||
}
|
||||
} while (++start != pend);
|
||||
++start;
|
||||
}
|
||||
|
||||
// We have to check if we have a number with more than 19 significant
|
||||
// digits.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user