diff --git a/src/t_set.c b/src/t_set.c index 3064807d..4db5372c 100644 --- a/src/t_set.c +++ b/src/t_set.c @@ -450,7 +450,7 @@ void srandmemberWithCountCommand(redisClient *c) { * The number of requested elements is greater than the number of * elements inside the set: simply return the whole set. */ if (count >= size) { - sunionDiffGenericCommand(c,c->argv,c->argc-1,NULL,REDIS_OP_UNION); + sunionDiffGenericCommand(c,c->argv+1,1,NULL,REDIS_OP_UNION); return; }