Skip to content

Commit

Permalink
Bugfix: char could be signed, check for > 127 would never succeed
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Jun 28, 2024
1 parent 515877e commit ce21ede
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sming/Core/Data/Format/Json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void Json::escape(String& value) const
debug_w("Invalid UTF8: %s", value.c_str());
for(unsigned i = 0; i < value.length(); ++i) {
char& c = value[i];
if(c < 0x20 || c > 127)
if(c < 0x20 || uint8_t(c) > 127)
c = '_';
}
}
Expand Down

0 comments on commit ce21ede

Please sign in to comment.