diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index 6e1d7f9..f734362 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -382,7 +382,7 @@ parse_digits_until_19(char const *&p, char const *pend, am_mant_t &mantissa) { p += 8; } /* - * finalizer + * Finalizer */ while (p != pend && mantissa < minimal_nineteen_digit_integer) { mantissa = mantissa * 10 + static_cast(*p - '0'); @@ -475,6 +475,9 @@ loop_parse_if_digits(UC const *&p, UC const *const pend, uint64_t &i) { } } } + /* + * Finalizer + */ while ((p != pend) && is_integer(*p)) { i = i * 10 + static_cast(*p - UC('0')); // may overflow, that's ok ++p; @@ -528,6 +531,13 @@ loop_parse_if_digits(char const *&p, char const *const pend, uint64_t &i) { p += sizeof(uint32_t); } } + /* + * Finalizer + */ + while ((p != pend) && is_integer(*p)) { + i = i * 10 + static_cast(*p - '0'); // may overflow, that's ok + ++p; + } } enum class parse_error : uint_fast8_t {