changeset 411:d0ebd797c5a1

Ah, OK -- it seems we get escapes for backslashes generally, so handle that
author Chris Cannam
date Tue, 07 Jun 2011 11:00:16 +0100
parents 4f5414a7edb4
children 498c2ca0b367
files src/common.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/common.cpp	Tue Jun 07 10:59:28 2011 +0100
+++ b/src/common.cpp	Tue Jun 07 11:00:16 2011 +0100
@@ -264,9 +264,9 @@
     for (int i = 0; i < s.length(); ++i) {
         // backslash-u escaped with another backslash: replace with a
         // single backslash and skip on
-        if (i+2 < s.length() && s[i] == '\\' && s[i+1] == '\\' && s[i+2] == 'u') {
-            d += "\\u";
-            i += 2;
+        if (i+1 < s.length() && s[i] == '\\' && s[i+1] == '\\') {
+            d += '\\';
+            i += 1;
             continue;
         }
         // unescaped backslash followed by u and at least four more