mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
Cast character to unsigned for comparison
This commit is contained in:
@ -9456,7 +9456,7 @@ scan_number_done:
|
||||
std::string result;
|
||||
for (const auto c : token_string)
|
||||
{
|
||||
if ('\x00' <= c and c <= '\x1F')
|
||||
if (static_cast<unsigned char>(c) <= '\x1F')
|
||||
{
|
||||
// escape control characters
|
||||
std::array<char, 9> cs{{}};
|
||||
|
Reference in New Issue
Block a user