Skip to content

Commit

Permalink
Merge pull request #304 from mosolovsa/issue-302
Browse files Browse the repository at this point in the history
Fixes issue where `crow::json` escapes UTF-8 characters above value `127`
  • Loading branch information
The-EDev committed Dec 17, 2021
2 parents 981dc58 + ddc1f18 commit 51d6d05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/crow/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace crow
case '\r': ret += "\\r"; break;
case '\t': ret += "\\t"; break;
default:
if (c < 0x20)
if (c >= 0 && c < 0x20)
{
ret += "\\u00";
auto to_hex = [](char c) {
Expand Down

0 comments on commit 51d6d05

Please sign in to comment.