mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-01-01 03:12:18 +08:00
Merge pull request #358 from shikharish/uint8-base-fix
add base check for uint8
This commit is contained in:
commit
d5bc4e1b2e
@ -515,6 +515,7 @@ parse_int_string(UC const *p, UC const *pend, T &value,
|
||||
UC const *const start_digits = p;
|
||||
|
||||
FASTFLOAT_IF_CONSTEXPR17((std::is_same<T, std::uint8_t>::value)) {
|
||||
if (base == 10) {
|
||||
const size_t len = (size_t)(pend - p);
|
||||
if (len == 0) {
|
||||
if (has_leading_zeros) {
|
||||
@ -603,6 +604,7 @@ parse_int_string(UC const *p, UC const *pend, T &value,
|
||||
answer.ptr = p + nd;
|
||||
return answer;
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t i = 0;
|
||||
if (base == 10) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user