projects
/
srvx.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed variable scope issue in modcmd.c:svccmd_invoke_argv
[srvx.git]
/
src
/
modcmd.c
diff --git
a/src/modcmd.c
b/src/modcmd.c
index a8e123a63dd9e285a52d050337e92c7646a12615..25a3fd39856cd0715cd444d6e3db9a1b5f4c8e9e 100644
(file)
--- a/
src/modcmd.c
+++ b/
src/modcmd.c
@@
-721,10
+721,14
@@
svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNo
/* Expand the alias arguments, if there are any. */
if (cmd->alias.used) {
/* Expand the alias arguments, if there are any. */
if (cmd->alias.used) {
- char *
new
_argv[MAXNUMPARAMS];
+ char *
old
_argv[MAXNUMPARAMS];
int res;
int res;
+ unsigned int nn;
+
+ for(nn=0;nn<argc;nn++)
+ old_argv[nn] = argv[nn];
- res = svccmd_expand_alias(cmd, argc,
argv, new_
argv);
+ res = svccmd_expand_alias(cmd, argc,
old_argv,
argv);
if (res < 0) {
send_message(user, service->bot, "MSG_MISSING_PARAMS", cmd->name);
return 0;
if (res < 0) {
send_message(user, service->bot, "MSG_MISSING_PARAMS", cmd->name);
return 0;
@@
-733,7
+737,6
@@
svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNo
return 0;
}
argc = res;
return 0;
}
argc = res;
- argv = new_argv;
/* Try again to grab a handle to the channel after alias
* expansion, overwriting any previous channel. This should,
/* Try again to grab a handle to the channel after alias
* expansion, overwriting any previous channel. This should,