[hackers] [scc] [libc] Fix touper() and tolower() || Roberto E. Vargas Caballero
commit e664ff944c0a8fd8fdafe37b48828397a49d045f
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Mar 3 19:30:38 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Mar 3 19:30:38 2017 +0100
[libc] Fix touper() and tolower()
diff --git a/libc/src/tolower.c b/libc/src/tolower.c
index 5b07040..9787086 100644
--- a/libc/src/tolower.c
+++ b/libc/src/tolower.c
_AT_@ -6,5 +6,5 @@
int
tolower(int c)
{
- return (isupper(c)) ? c & ~0x20 : c;
+ return (isupper(c)) ? c | 0x20 : c;
}
diff --git a/libc/src/toupper.c b/libc/src/toupper.c
index 7f47242..7f35098 100644
--- a/libc/src/toupper.c
+++ b/libc/src/toupper.c
_AT_@ -7,5 +7,5 @@
int
toupper(int c)
{
- return (islower(c)) ? c | 0x20 : c;
+ return (islower(c)) ? c & ~0x20 : c;
}
Received on Fri Mar 03 2017 - 21:02:18 CET
This archive was generated by hypermail 2.3.0
: Fri Mar 03 2017 - 21:12:17 CET