From: Stefan Sayer Date: Fri, 31 Jul 2015 01:12:00 +0200 Subject: [PATCH] b/f:core:json: fix printing special characters (cherry picked from commit 7793cf157f7d8971db4ca3feb08900b4281c1802) diff --git a/core/jsonArg.cpp b/core/jsonArg.cpp index 78cfc8ca..f49186fa 100644 --- a/core/jsonArg.cpp +++ b/core/jsonArg.cpp @@ -94,7 +94,7 @@ string str2json(const char* str, size_t len) // (I hope I am not misunderstanding something.) default:{ if (*c < ' ') - result += "\\u00" + hex_chars[*c >> 4] + hex_chars[*c & 0xf]; + result += "\\u00" + string() + hex_chars[*c >> 4] + string() + hex_chars[*c & 0xf]; else result += *c; } break;