From bb975144e4e84b618c8d4f1aa5adae428828b544 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 26 Oct 2009 16:43:56 +0100 Subject: [PATCH] Fix for skiplists backward link --- redis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis.c b/redis.c index eb0a1730..202b0a69 100644 --- a/redis.c +++ b/redis.c @@ -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