mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 08:00:49 +00:00
adlist: fix listJoin() in the case the second list is empty.
See #4192, the original PR removed lines of code that are actually needed, so thanks to @chunqiulfq for reporting the problem, but merging solution from @jeesyn after checking, together with @artix75, that the logic covers all the cases.
This commit is contained in:
parent
a13106e001
commit
c44732ac58
@ -353,7 +353,7 @@ void listJoin(list *l, list *o) {
|
||||
else
|
||||
l->head = o->head;
|
||||
|
||||
l->tail = o->tail;
|
||||
if (o->tail) l->tail = o->tail;
|
||||
l->len += o->len;
|
||||
|
||||
/* Setup other as an empty list. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user