From 099a49e6d5b79662eaa5c8367726302e639d5715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Mon, 8 Jan 2018 21:45:53 +0100 Subject: [PATCH] degesch: fix a minor bug in buffer_merge() The pointer to the last item in the linked list wasn't always fixed, although nothing really touched it afterwards. --- degesch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/degesch.c b/degesch.c index 612722b..841bea3 100644 --- a/degesch.c +++ b/degesch.c @@ -4221,8 +4221,7 @@ buffer_merge (struct app_context *ctx, merged->lines = NULL; else if (start->prev) start->prev->next = NULL; - if (start == merged->lines_tail) - merged->lines_tail = start->prev; + merged->lines_tail = start->prev; merged->lines_count -= n; // And append them to current lines in the buffer