From: Anthony Minessale Date: Wed, 12 Jan 2011 21:32:37 +0000 (-0600) Subject: let switch_end_paren work with delims of the same char X-Git-Tag: v1.2-rc1~203^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d1e664dc86c1b533bf70ad688fc58bbc0438073;p=thirdparty%2Ffreeswitch.git let switch_end_paren work with delims of the same char --- diff --git a/src/switch_utils.c b/src/switch_utils.c index 3622442710..1578e63f9a 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -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--;