From 7d1e664dc86c1b533bf70ad688fc58bbc0438073 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 12 Jan 2011 15:32:37 -0600 Subject: [PATCH] let switch_end_paren work with delims of the same char --- src/switch_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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--;