From cec8195e5ebd6a83a3667f65022fc6135a4f2024 Mon Sep 17 00:00:00 2001 From: zimoch Date: Wed, 16 May 2012 14:24:21 +0000 Subject: [PATCH] always escape special chars and bytes --- src/StreamProtocol.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/StreamProtocol.cc b/src/StreamProtocol.cc index b3b8a02..40367da 100644 --- a/src/StreamProtocol.cc +++ b/src/StreamProtocol.cc @@ -1211,8 +1211,7 @@ compileString(StreamBuffer& buffer, const char*& source, c=*source; } source+=n; - if (formatType != NoFormat && - (c < last_function_code || c == esc || c == '%')) + if (formatType != NoFormat) { buffer.append(esc); } @@ -1284,8 +1283,7 @@ compileString(StreamBuffer& buffer, const char*& source, "Value %s does not fit in byte\n", source); return false; } - if (formatType != NoFormat && - (c < last_function_code || c == esc || c == '%')) + if (formatType != NoFormat) { buffer.append(esc); } @@ -1349,8 +1347,7 @@ compileString(StreamBuffer& buffer, const char*& source, source); return false; } - if (formatType != NoFormat && - (c < last_function_code || c == esc)) + if (formatType != NoFormat) { buffer.append(esc); }