mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-09 11:16:45 +08:00
fix for parse_int_string.
This commit is contained in:
parent
5e6dab242c
commit
63b882e3b4
@ -608,7 +608,7 @@ parse_int_string(UC const *p, UC const *pend, T &value,
|
|||||||
uint32_t const magic =
|
uint32_t const magic =
|
||||||
((digits + 0x46464646u) | (digits - 0x30303030u)) & 0x80808080u;
|
((digits + 0x46464646u) | (digits - 0x30303030u)) & 0x80808080u;
|
||||||
auto const tz = countr_zero_32(magic); // 7, 15, 23, 31, or 32
|
auto const tz = countr_zero_32(magic); // 7, 15, 23, 31, or 32
|
||||||
auto nd = am_digits(tz >> 3);
|
am_digits nd = (tz == 32) ? 4 : (tz >> 3);
|
||||||
nd = std::min(nd, len);
|
nd = std::min(nd, len);
|
||||||
if (nd == 0) {
|
if (nd == 0) {
|
||||||
if (has_leading_zeros) {
|
if (has_leading_zeros) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user