commit e664ff944c0a8fd8fdafe37b48828397a49d045f parent aa087c6f77d443260ead06fefee9f9b39d908592 Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Fri, 3 Mar 2017 19:30:38 +0100 [libc] Fix touper() and tolower() Diffstat:
M | libc/src/tolower.c | | | 2 | +- |
M | libc/src/toupper.c | | | 2 | +- |
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/src/tolower.c b/libc/src/tolower.c @@ -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 @@ -7,5 +7,5 @@ int toupper(int c) { - return (islower(c)) ? c | 0x20 : c; + return (islower(c)) ? c & ~0x20 : c; }