Commit 23051df2 by Tobias Kux

Cast character to unsigned for comparison

parent d70d06ae
...@@ -1367,7 +1367,7 @@ scan_number_done: ...@@ -1367,7 +1367,7 @@ scan_number_done:
std::string result; std::string result;
for (const auto c : token_string) for (const auto c : token_string)
{ {
if ('\x00' <= c and c <= '\x1F') if (static_cast<unsigned char>(c) <= '\x1F')
{ {
// escape control characters // escape control characters
std::array<char, 9> cs{{}}; std::array<char, 9> cs{{}};
......
...@@ -9456,7 +9456,7 @@ scan_number_done: ...@@ -9456,7 +9456,7 @@ scan_number_done:
std::string result; std::string result;
for (const auto c : token_string) for (const auto c : token_string)
{ {
if ('\x00' <= c and c <= '\x1F') if (static_cast<unsigned char>(c) <= '\x1F')
{ {
// escape control characters // escape control characters
std::array<char, 9> cs{{}}; std::array<char, 9> cs{{}};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment