diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-21 23:26:13 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-21 23:26:13 +0000 |
commit | 0b18ef5e51589240170b70e8ff7b5ffb01f607ce (patch) | |
tree | b223dbd26ca9705a1f22688808172ca8cae69eb9 /apps/app_macro.c | |
parent | 38ec00d7ce9bb580eec7bfdbf94fdea4407d00ac (diff) |
Actually set variable name before using
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1400 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_macro.c')
-rwxr-xr-x | apps/app_macro.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_macro.c b/apps/app_macro.c index 4ea0947bb..6cb07bd6f 100755 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -129,10 +129,10 @@ static int macro_exec(struct ast_channel *chan, void *data) while((cur = strsep(&rest, "|")) && (argc < MAX_ARGS)) { /* Save copy of old arguments if we're overwriting some, otherwise let them pass through to the other macro */ + snprintf(varname, sizeof(varname), "ARG%d", argc); oldargs[argc] = pbx_builtin_getvar_helper(chan, varname); if (oldargs[argc]) oldargs[argc] = strdup(oldargs[argc]); - snprintf(varname, sizeof(varname), "ARG%d", argc); pbx_builtin_setvar_helper(chan, varname, cur); argc++; } |