mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
clip_addchar: merge memory-management performance fix.
This commit is contained in:
commit
f56dd17709
@ -5445,7 +5445,7 @@ typedef struct {
|
|||||||
static void clip_addchar(clip_workbuf *b, wchar_t chr, int attr)
|
static void clip_addchar(clip_workbuf *b, wchar_t chr, int attr)
|
||||||
{
|
{
|
||||||
if (b->bufpos >= b->buflen) {
|
if (b->bufpos >= b->buflen) {
|
||||||
b->buflen += 128;
|
b->buflen *= 2;
|
||||||
b->textbuf = sresize(b->textbuf, b->buflen, wchar_t);
|
b->textbuf = sresize(b->textbuf, b->buflen, wchar_t);
|
||||||
b->textptr = b->textbuf + b->bufpos;
|
b->textptr = b->textbuf + b->bufpos;
|
||||||
b->attrbuf = sresize(b->attrbuf, b->buflen, int);
|
b->attrbuf = sresize(b->attrbuf, b->buflen, int);
|
||||||
|
Loading…
Reference in New Issue
Block a user