From 201799a9ee7082ba8b7cb1a3229c092ab846543e Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 26 Jun 2023 01:12:45 -0400 Subject: [PATCH] "Fix text selection memory corruption with long codepoints", by juliusikkala. --- pdcurses/getch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdcurses/getch.c b/pdcurses/getch.c index 58a44c27..61deee4d 100644 --- a/pdcurses/getch.c +++ b/pdcurses/getch.c @@ -158,7 +158,7 @@ static void _copy(void) #ifdef PDC_WIDE wtmp = malloc((len + 1) * sizeof(wchar_t)); - len *= 3; + len *= 4; #endif tmp = malloc(len + 1);