mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Merge pull request #5459 from itamarhaber/xpending_count_underflow
A fix to XPENDING's count underflow
This commit is contained in:
commit
12d5be1bf2
@ -1892,7 +1892,7 @@ void xackCommand(client *c) {
|
|||||||
addReplyLongLong(c,acknowledged);
|
addReplyLongLong(c,acknowledged);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XPENDING <key> <group> [<start> <stop> <count>] [<consumer>]
|
/* XPENDING <key> <group> [<start> <stop> <count> [<consumer>]]
|
||||||
*
|
*
|
||||||
* If start and stop are omitted, the command just outputs information about
|
* If start and stop are omitted, the command just outputs information about
|
||||||
* the amount of pending messages for the key/group pair, together with
|
* the amount of pending messages for the key/group pair, together with
|
||||||
@ -1921,6 +1921,7 @@ void xpendingCommand(client *c) {
|
|||||||
if (c->argc >= 6) {
|
if (c->argc >= 6) {
|
||||||
if (getLongLongFromObjectOrReply(c,c->argv[5],&count,NULL) == C_ERR)
|
if (getLongLongFromObjectOrReply(c,c->argv[5],&count,NULL) == C_ERR)
|
||||||
return;
|
return;
|
||||||
|
if (count < 0) count = 0;
|
||||||
if (streamParseIDOrReply(c,c->argv[3],&startid,0) == C_ERR)
|
if (streamParseIDOrReply(c,c->argv[3],&startid,0) == C_ERR)
|
||||||
return;
|
return;
|
||||||
if (streamParseIDOrReply(c,c->argv[4],&endid,UINT64_MAX) == C_ERR)
|
if (streamParseIDOrReply(c,c->argv[4],&endid,UINT64_MAX) == C_ERR)
|
||||||
|
Loading…
Reference in New Issue
Block a user