Merge pull request #929 from ltnwgl/unstable
Fix a bug in srandmemberWithCountCommand()
This commit is contained in:
commit
74f4f29880
@ -469,7 +469,7 @@ void srandmemberWithCountCommand(redisClient *c) {
|
|||||||
* The number of requested elements is greater than the number of
|
* The number of requested elements is greater than the number of
|
||||||
* elements inside the set: simply return the whole set. */
|
* elements inside the set: simply return the whole set. */
|
||||||
if (count >= size) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user