Skip to content

Commit cdd6139

Browse files
committed
removed char <=0 comparison
(not sure why it invoked an error in ARM now)
1 parent fce4aed commit cdd6139

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/crow/json.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace crow
3535
inline void escape(const std::string& str, std::string& ret)
3636
{
3737
ret.reserve(ret.size() + str.size()+str.size()/4);
38-
for(char c:str)
38+
for(unsigned char c:str)
3939
{
4040
switch(c)
4141
{
@@ -47,7 +47,7 @@ namespace crow
4747
case '\r': ret += "\\r"; break;
4848
case '\t': ret += "\\t"; break;
4949
default:
50-
if (0 <= c && c < 0x20)
50+
if (c < 0x20)
5151
{
5252
ret += "\\u00";
5353
auto to_hex = [](char c)

0 commit comments

Comments
 (0)