mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
ZPOP should return an empty array if COUNT=0
This commit is contained in:
parent
b270322ff9
commit
2502956835
@ -3140,7 +3140,10 @@ void genericZpopCommand(client *c, robj **keyv, int keyc, int where, int emitkey
|
|||||||
if (countarg) {
|
if (countarg) {
|
||||||
if (getLongFromObjectOrReply(c,countarg,&count,NULL) != C_OK)
|
if (getLongFromObjectOrReply(c,countarg,&count,NULL) != C_OK)
|
||||||
return;
|
return;
|
||||||
if (count < 0) count = 1;
|
if (count <= 0) {
|
||||||
|
addReplyNullArray(c);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check type and break on the first error, otherwise identify candidate. */
|
/* Check type and break on the first error, otherwise identify candidate. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user