[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:
Thomas Faber 2020-02-09 10:20:48 +01:00
parent 6f232770d3
commit d528e63477
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -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;