mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[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:
parent
feb7275bc8
commit
e884290d29
1 changed files with 5 additions and 1 deletions
|
@ -16,9 +16,13 @@
|
||||||
char * CDECL _strupr(char *x)
|
char * CDECL _strupr(char *x)
|
||||||
{
|
{
|
||||||
char *y=x;
|
char *y=x;
|
||||||
|
char ch, upper;
|
||||||
|
|
||||||
while (*y) {
|
while (*y) {
|
||||||
*y=toupper(*y);
|
ch = *y;
|
||||||
|
upper = toupper(ch);
|
||||||
|
if (ch != upper)
|
||||||
|
*y = upper;
|
||||||
y++;
|
y++;
|
||||||
}
|
}
|
||||||
return x;
|
return x;
|
||||||
|
|
Loading…
Reference in a new issue