diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index b59e549..333ada9 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -460,6 +460,11 @@ from_chars_result_t parse_int_string(UC const* p, UC const* pend, T& value, ++p; } + // skip leading zeros + while (p != pend && *p == UC('0')) { + ++p; + } + UC const* const start_digits = p; uint64_t i = 0; diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index e5d8446..f0d09cb 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -747,7 +747,7 @@ fastfloat_really_inline constexpr int max_digits_u64(int base) { return int_luts<>::maxdigits_u64[base - 2]; } // If a u64 is exactly max_digits_u64() in length, this is -// the minimum value below which it has definitely overflowed. +// the value below which it has definitely overflowed. fastfloat_really_inline constexpr uint64_t min_safe_u64(int base) { return int_luts<>::min_safe_u64[base - 2]; }