projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f23277
)
[CRT] Only write to the output buffer when necessary in _strlwr. CORE-16667
author
Thomas Faber
<thomas.faber@reactos.org>
Sun, 9 Feb 2020 09:20:48 +0000
(10:20 +0100)
committer
Thomas Faber
<thomas.faber@reactos.org>
Sun, 9 Feb 2020 09:23:01 +0000
(10:23 +0100)
Like
e884290d292
, this is also a hack and is missing locale awareness.
sdk/lib/crt/string/strlwr.c
patch
|
blob
|
history
diff --git
a/sdk/lib/crt/string/strlwr.c
b/sdk/lib/crt/string/strlwr.c
index
5966a5b
..
53d06dc
100644
(file)
--- a/
sdk/lib/crt/string/strlwr.c
+++ b/
sdk/lib/crt/string/strlwr.c
@@
-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;