X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/2612e0521fde55db2c720092d4ad02a8f015f46e..bfe85f7ca97259256e8089349e1a462b6c7dbd00:/src/multi.c 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;