diff --git a/lib/json.cpp b/lib/json.cpp index 3a90d1bf..f67e5ef5 100644 --- a/lib/json.cpp +++ b/lib/json.cpp @@ -178,7 +178,7 @@ static std::string read_string(char separator, std::istream &fromstream){ while (fromstream.good()){ char c; fromstream.get(c); - if (c == '\\'){ + if (!escaped && c == '\\'){ escaped = true; continue; } @@ -189,6 +189,7 @@ static std::string read_string(char separator, std::istream &fromstream){ } switch (c){ case 'b': out += '\b'; break; + case '\\': out += '\\'; break; case 'f': out += '\f'; break; case 'n': out += '\n'; break; case 'r': out += '\r'; break;