diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2006-04-18 23:24:02 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2006-04-18 23:24:02 +0000 |
commit | c87f4bd7a8536487fe366f7ee86758d8786d2ab0 (patch) | |
tree | 2ae284c3cf056bb0681dcda7b1febb44085f35bd /pbx.c | |
parent | d85073dc1f6c25d09610b8c56871474eaeae55d4 (diff) |
don't ignore left-curly-braces when searching for the end of a variable/function reference; match them up with right-curly-braces so we choose the proper brace to end the reference (will still fail to parse properly if the reference contains unbalanced braces)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rw-r--r-- | pbx.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1343,10 +1343,12 @@ static void pbx_substitute_variables_helper_full(struct ast_channel *c, struct v needsub = 0; /* Find the end of it */ - while(brackets && *vare) { + while (brackets && *vare) { if ((vare[0] == '$') && (vare[1] == '{')) { needsub++; brackets++; + } else if (vare[0] == '{') { + brackets++; } else if (vare[0] == '}') { brackets--; } else if ((vare[0] == '$') && (vare[1] == '[')) |