pager history: fix bufsize calculation
bufsize was bigger than the actual allocated memory
Fixes: b9e6557f729f ("Allow arbitrary sized lines in the secondary scrollback buffer")
This commit is contained in:
parent
60de840d69
commit
3a6bc94d25
@ -73,7 +73,7 @@ pagerhist_extend(PagerHistoryBuf *ph, size_t minsz) {
|
|||||||
void *newbuf = PyMem_Realloc(ph->buffer, newsz * sizeof(Py_UCS4));
|
void *newbuf = PyMem_Realloc(ph->buffer, newsz * sizeof(Py_UCS4));
|
||||||
if (!newbuf) return false;
|
if (!newbuf) return false;
|
||||||
ph->buffer = newbuf;
|
ph->buffer = newbuf;
|
||||||
ph->bufsize += newsz;
|
ph->bufsize = newsz;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user