changeset 1452:83e275dca409

Fix escaping bug in strip_arg_special_chars() Hopefully fix the escape bug reported by bb...
author Mikael Berthe <mikael@lilotux.net>
date Wed, 02 Apr 2008 22:26:44 +0200
parents bf6539a31d65
children f560710a6ad1
files mcabber/src/utils.c
diffstat 1 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/utils.c	Wed Apr 02 21:25:51 2008 +0200
+++ b/mcabber/src/utils.c	Wed Apr 02 22:26:44 2008 +0200
@@ -393,20 +393,16 @@
         instring = !instring;
         strcpy(p, p+1);
         p--;
-      } else {
+      } else
         escape = FALSE;
-      }
     } else if (*p == '\\') {
       if (!escape) {
-        if (*(p+1) == '"') {
-          strcpy(p, p+1);
-          p--;
-        }
-        escape = TRUE;
-      } else {
-        escape = FALSE;
+        strcpy(p, p+1);
+        p--;
       }
-    }
+      escape = !escape;
+    } else
+      escape = FALSE;
   }
 }