[CRT] Only write to the output buffer when necessary in _strupr. CORE-16667

Fixes crash in msvcrt_winetest:string.

This is a hack and is supposed to be specific to the C locale.
This commit is contained in:
Thomas Faber
2020-02-08 13:04:12 +01:00
parent feb7275bc8
commit e884290d29
+5 -1
View File
@@ -16,9 +16,13 @@
char * CDECL _strupr(char *x)
{
char *y=x;
char ch, upper;
while (*y) {
*y=toupper(*y);
ch = *y;
upper = toupper(ch);
if (ch != upper)
*y = upper;
y++;
}
return x;