mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 11:51:01 +00:00
Fix for skiplists backward link
This commit is contained in:
parent
325d1eb4a8
commit
bb975144e4
2
redis.c
2
redis.c
@ -3776,7 +3776,7 @@ static void zslInsert(zskiplist *zsl, double score, robj *obj) {
|
|||||||
x->forward[i] = update[i]->forward[i];
|
x->forward[i] = update[i]->forward[i];
|
||||||
update[i]->forward[i] = x;
|
update[i]->forward[i] = x;
|
||||||
}
|
}
|
||||||
x->backward = (update[0] == zsl->header) ? NULL : update[i];
|
x->backward = (update[0] == zsl->header) ? NULL : update[0];
|
||||||
if (x->forward[0])
|
if (x->forward[0])
|
||||||
x->forward[0]->backward = x;
|
x->forward[0]->backward = x;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user