Commit bb975144 authored by antirez's avatar antirez
Browse files

Fix for skiplists backward link

parent 325d1eb4
......@@ -3776,7 +3776,7 @@ static void zslInsert(zskiplist *zsl, double score, robj *obj) {
x->forward[i] = update[i]->forward[i];
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])
x->forward[0]->backward = x;
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment