mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 17:51:50 +00: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:
parent
6f232770d3
commit
d528e63477
1 changed files with 5 additions and 1 deletions
|
@ -7,9 +7,13 @@
|
||||||
char * CDECL _strlwr(char *x)
|
char * CDECL _strlwr(char *x)
|
||||||
{
|
{
|
||||||
char *y=x;
|
char *y=x;
|
||||||
|
char ch, lower;
|
||||||
|
|
||||||
while (*y) {
|
while (*y) {
|
||||||
*y=tolower(*y);
|
ch = *y;
|
||||||
|
lower = tolower(ch);
|
||||||
|
if (ch != lower)
|
||||||
|
*y = lower;
|
||||||
y++;
|
y++;
|
||||||
}
|
}
|
||||||
return x;
|
return x;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue