aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2018-01-08 21:45:53 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2018-01-08 22:17:02 +0100
commit099a49e6d5b79662eaa5c8367726302e639d5715 (patch)
tree41e736be52650c07cd457d73b1a284233be06f5b
parent4627ee82dd825690218317ab9e6a991c5afcfb42 (diff)
downloadxK-099a49e6d5b79662eaa5c8367726302e639d5715.tar.gz
xK-099a49e6d5b79662eaa5c8367726302e639d5715.tar.xz
xK-099a49e6d5b79662eaa5c8367726302e639d5715.zip
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.
-rw-r--r--degesch.c3
1 files changed, 1 insertions, 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