From: David Reiss Date: Tue, 8 Apr 2008 19:38:49 +0000 (+0000) Subject: Fix a minor bug in TDebugProtocol and remove dead code. X-Git-Tag: 0.2.0~822 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=b54deb1ca538b2f244225801408637aa8921d5db;p=common%2Fthrift.git Fix a minor bug in TDebugProtocol and remove dead code. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665650 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/cpp/src/protocol/TDebugProtocol.cpp b/lib/cpp/src/protocol/TDebugProtocol.cpp index f79e97fc..4cc3df82 100644 --- a/lib/cpp/src/protocol/TDebugProtocol.cpp +++ b/lib/cpp/src/protocol/TDebugProtocol.cpp @@ -300,14 +300,13 @@ uint32_t TDebugProtocol::writeString(const string& str) { for (string::const_iterator it = to_show.begin(); it != to_show.end(); ++it) { if (*it == '\\') { - output += "\\"; + output += "\\\\"; } else if (*it == '"') { output += "\\\""; } else if (std::isprint(*it)) { output += *it; } else { switch (*it) { - case '\"': output += "\\\""; break; case '\a': output += "\\a"; break; case '\b': output += "\\b"; break; case '\f': output += "\\f"; break;