mirror of
https://github.com/nlohmann/json.git
synced 2025-07-12 09:21:42 +03:00
Fixed conversion warnings
Use static_cast on digit.
This commit is contained in:
@ -9769,7 +9769,7 @@ class basic_json
|
||||
// skip if definitely not an integer
|
||||
if (type != value_t::number_float)
|
||||
{
|
||||
auto digit = *curptr - '0';
|
||||
auto digit = static_cast<number_unsigned_t>(*curptr - '0');
|
||||
|
||||
// overflow if value * 10 + digit > max, move terms around
|
||||
// to avoid overflow in intermediate values
|
||||
|
Reference in New Issue
Block a user