mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 08:50:24 +08:00
[CRT] Only write to the output buffer when necessary in _strlwr. CORE-16667
Like e884290d29, this is also a hack and is missing locale awareness.
This commit is contained in:
@@ -7,9 +7,13 @@
|
||||
char * CDECL _strlwr(char *x)
|
||||
{
|
||||
char *y=x;
|
||||
char ch, lower;
|
||||
|
||||
while (*y) {
|
||||
*y=tolower(*y);
|
||||
ch = *y;
|
||||
lower = tolower(ch);
|
||||
if (ch != lower)
|
||||
*y = lower;
|
||||
y++;
|
||||
}
|
||||
return x;
|
||||
|
||||
Reference in New Issue
Block a user