[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 2019-09-08 15:23:32 +02:00
parent feb7275bc8
commit e884290d29
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

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;