From: Mark Spencer Date: Fri, 25 Jun 2004 18:23:26 +0000 (+0000) Subject: Cleanup handling of complex expressions (bug #1919) X-Git-Tag: 1.0.0-rc1~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6de64a5a9848fc515930616435de559959e4f69;p=thirdparty%2Fasterisk.git Cleanup handling of complex expressions (bug #1919) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3304 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/pbx.c b/pbx.c index 7387d7c959..fc7fe10ad4 100755 --- a/pbx.c +++ b/pbx.c @@ -1099,10 +1099,15 @@ void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char if ((vare[0] == '$') && (vare[1] == '[')) { needsub++; brackets++; + vare++; + } else if (vare[0] == '[') { + brackets++; } else if (vare[0] == ']') { brackets--; - } else if ((vare[0] == '$') && (vare[1] == '{')) + } else if ((vare[0] == '$') && (vare[1] == '{')) { needsub++; + vare++ + } vare++; } if (brackets)