aboutsummaryrefslogtreecommitdiff
path: root/ft_toupper.c
diff options
context:
space:
mode:
Diffstat (limited to 'ft_toupper.c')
-rw-r--r--ft_toupper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ft_toupper.c b/ft_toupper.c
index 7e85f8d..2832c28 100644
--- a/ft_toupper.c
+++ b/ft_toupper.c
@@ -2,6 +2,12 @@
int ft_toupper(int c)
{
+ if (c < -1)
+ return (c + 256);
+ if (c == -1)
+ return (-1);
+ if (c == 0)
+ return (0);
if (c >= 'a' && c <= 'z')
return (c - 'a' + 'A');
return (c);