]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
let switch_end_paren work with delims of the same char
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 12 Jan 2011 21:32:37 +0000 (15:32 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 12 Jan 2011 21:32:46 +0000 (15:32 -0600)
src/switch_utils.c

index 3622442710857f85647e9e2530fe33c8bb9962de..1578e63f9a374f7ed3ab57afc0c99bb0753008c6 100644 (file)
@@ -372,7 +372,7 @@ SWITCH_DECLARE(char *) switch_find_end_paren(const char *s, char open, char clos
        if (s && *s == open) {
                depth++;
                for (e = s + 1; e && *e; e++) {
-                       if (*e == open) {
+                       if (*e == open && open != close) {
                                depth++;
                        } else if (*e == close) {
                                depth--;