Uppercase fix for Turkish. Make use of full allocated space of ustr.

This commit is contained in:
Pere Pujal i Carabantes 2022-01-01 19:58:36 +01:00
parent be5cbc22ba
commit 88f689c744

View file

@ -18376,7 +18376,7 @@ static char *uppercase(const char *restrict const str)
dest[i] = towupper(dest[i]);
}
while (dest[i++]);
wcstombs(ustr, dest, n); /* at most n bytes written */
wcstombs(ustr, dest, n * 2); /* at most n * 2 bytes written */
#ifdef DEBUG
printf(" ORIGINAL: %s\n" "UPPERCASE: %s\n\n", str, ustr);