From d412fed5422ebf1622f38c432bea1c93d679f79a Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 16 Oct 2004 12:36:50 +0000 Subject: [PATCH] Fix bug in scrollback compression, which manifested when attempting to encode a very long (len>128) run of the same literal. [originally from svn r4647] --- terminal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/terminal.c b/terminal.c index 40ad4823..1a65e71b 100644 --- a/terminal.c +++ b/terminal.c @@ -435,6 +435,9 @@ static void makerle(struct buf *b, termline *ldata, hdrpos = b->len; hdrsize = 0; add(b, 0); + /* And ensure this run doesn't interfere with the next. */ + prevlen = prevpos = 0; + prev2 = FALSE; continue; } else {