From 3a6bc94d2533d05966197b6e3be0a41fa522465a Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Fri, 30 Nov 2018 16:04:46 +0900 Subject: [PATCH] pager history: fix bufsize calculation bufsize was bigger than the actual allocated memory Fixes: b9e6557f729f ("Allow arbitrary sized lines in the secondary scrollback buffer") --- kitty/history.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/history.c b/kitty/history.c index 248fd16a4..bf7d04280 100644 --- a/kitty/history.c +++ b/kitty/history.c @@ -73,7 +73,7 @@ pagerhist_extend(PagerHistoryBuf *ph, size_t minsz) { void *newbuf = PyMem_Realloc(ph->buffer, newsz * sizeof(Py_UCS4)); if (!newbuf) return false; ph->buffer = newbuf; - ph->bufsize += newsz; + ph->bufsize = newsz; return true; }