mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 01:20:50 +00:00
Streams: fix reverse iteration next node jumping.
This commit is contained in:
parent
ee3490ec48
commit
6919280cc5
@ -540,7 +540,11 @@ int streamIteratorGetID(streamIterator *si, streamID *id, int64_t *numfields) {
|
|||||||
* entry is composed of, and jump backward N times to seek
|
* entry is composed of, and jump backward N times to seek
|
||||||
* its start. */
|
* its start. */
|
||||||
int lp_count = lpGetInteger(si->lp_ele);
|
int lp_count = lpGetInteger(si->lp_ele);
|
||||||
if (lp_count == 0) break; /* We reached the master entry. */
|
if (lp_count == 0) { /* We reached the master entry. */
|
||||||
|
si->lp = NULL;
|
||||||
|
si->lp_ele = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
while(lp_count--) si->lp_ele = lpPrev(si->lp,si->lp_ele);
|
while(lp_count--) si->lp_ele = lpPrev(si->lp,si->lp_ele);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user