X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/1b1f47c915c69eae40d99727267b147f7c5a44ac..497fc8775fd4b85289a6998bb4eaddbe657e6be7:/src/multi.c?ds=sidebyside diff --git a/src/multi.c b/src/multi.c index 59fc9d9e..ba3a0cd6 100644 --- a/src/multi.c +++ b/src/multi.c @@ -110,6 +110,10 @@ void execCommand(redisClient *c) { c->argc = c->mstate.commands[j].argc; c->argv = c->mstate.commands[j].argv; call(c,c->mstate.commands[j].cmd); + + /* Commands may alter argc/argv, restore mstate. */ + c->mstate.commands[j].argc = c->argc; + c->mstate.commands[j].argv = c->argv; } c->argv = orig_argv; c->argc = orig_argc;