reset our buffer each iteration when doing variable substitution

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@327512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Nicholson
2011-07-11 13:53:59 +00:00
parent 5bff785fc6
commit 0bc1f651c7
2 changed files with 4 additions and 0 deletions

View File

@@ -3620,6 +3620,9 @@ void ast_str_substitute_variables_full(struct ast_str **buf, ssize_t maxlen, str
ast_str_reset(*buf);
whereweare = tmp = templ;
while (!ast_strlen_zero(whereweare)) {
/* reset our buffer */
ast_str_reset(substr3);
/* Assume we're copying the whole remaining string */
pos = strlen(whereweare);
nextvar = NULL;