add command arg to clientArgs helper

Former-commit-id: b6f388ee3bd269bd8373ea16adb379ec6922ee0a
This commit is contained in:
malavan 2021-09-08 21:16:04 +00:00
parent 286e9cccdc
commit a15352fc8a
2 changed files with 2 additions and 2 deletions

View File

@ -4954,7 +4954,7 @@ bool client::postFunction(std::function<void(client *)> fn, bool fLock) {
std::vector<robj_sharedptr> clientArgs(client *c) { std::vector<robj_sharedptr> clientArgs(client *c) {
std::vector<robj_sharedptr> args; std::vector<robj_sharedptr> args;
for (int j = 1; j < c->argc; j++) { for (int j = 0; j < c->argc; j++) {
args.push_back(robj_sharedptr(c->argv[j])); args.push_back(robj_sharedptr(c->argv[j]));
} }
return args; return args;

View File

@ -545,7 +545,7 @@ void mgetCommand(client *c) {
if (c->argc > 100) { if (c->argc > 100) {
if (c->asyncCommand( if (c->asyncCommand(
[c] (const redisDbPersistentDataSnapshot *snapshot, const std::vector<robj_sharedptr> &keys) { [c] (const redisDbPersistentDataSnapshot *snapshot, const std::vector<robj_sharedptr> &keys) {
mgetCore(c, (robj **)keys.data(), keys.size(), snapshot); mgetCore(c, (robj **)keys.data() + 1, keys.size() - 1, snapshot);
} }
)) { )) {
return; return;