Skip to content

Commit d59cda5

Browse files
author
Mosolov Sergey
committed
Fixes issue 302
CrowCpp/Crow#302 Escape only the invisible characters from 0 to 31 inclusive Motivation: do not escape UTF8 encoding bytes
1 parent f96189f commit d59cda5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/crow/json.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ namespace crow
5353
case '\r': ret += "\\r"; break;
5454
case '\t': ret += "\\t"; break;
5555
default:
56-
if (c < 0x20)
56+
if (c >= 0 && c < 0x20)
5757
{
5858
ret += "\\u00";
5959
auto to_hex = [](char c) {

0 commit comments

Comments
 (0)