let switch_end_paren work with delims of the same char

This commit is contained in:
Anthony Minessale 2011-01-12 15:32:37 -06:00
parent d2c34232ab
commit 7d1e664dc8

View 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--;