mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
add_cc: use sgrowarray when growing the line size.
Somehow missed this one in commit e0a76971c
.
This commit is contained in:
parent
e0a76971cc
commit
b4ae5af588
@ -213,8 +213,12 @@ static void add_cc(termline *line, int col, unsigned long chr)
|
||||
*/
|
||||
if (!line->cc_free) {
|
||||
int n = line->size;
|
||||
line->size += 16 + (line->size - line->cols) / 2;
|
||||
line->chars = sresize(line->chars, line->size, termchar);
|
||||
|
||||
size_t tmpsize = line->size;
|
||||
sgrowarray(line->chars, tmpsize, tmpsize);
|
||||
assert(tmpsize <= INT_MAX);
|
||||
line->size = tmpsize;
|
||||
|
||||
line->cc_free = n;
|
||||
while (n < line->size) {
|
||||
if (n+1 < line->size)
|
||||
|
Loading…
Reference in New Issue
Block a user