reactos/sdk/lib/crt/string/strupr.c
Thomas Faber e884290d29
[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.
2020-02-08 13:04:12 +01:00

30 lines
407 B
C

/*
* The C RunTime DLL
*
* Implements C run-time functionality as known from UNIX.
*
* Copyright 1996,1998 Marcus Meissner
* Copyright 1996 Jukka Iivonen
* Copyright 1997 Uwe Bonnes
*/
#include <precomp.h>
/*
* @implemented
*/
char * CDECL _strupr(char *x)
{
char *y=x;
char ch, upper;
while (*y) {
ch = *y;
upper = toupper(ch);
if (ch != upper)
*y = upper;
y++;
}
return x;
}