Skip to content

Commit 9faf0a8

Browse files
committed
cast to unsigned char before std::isprint in jsonParseStrict
1 parent 9a4574b commit 9faf0a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libsolutil/JSON.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ bool jsonParseStrict(std::string const& _input, Json& _json, std::string* _errs
157157
{
158158
std::stringstream escaped;
159159
for (char c: removeNlohmannInternalErrorIdentifier(e.what()))
160-
if (std::isprint(c))
160+
if (std::isprint(static_cast<unsigned char>(c)))
161161
escaped << c;
162162
else
163163
escaped << "\\x" + toHex(static_cast<uint8_t>(c));

0 commit comments

Comments
 (0)