From 88aa612a4e75833368f6c4552d95d1d5c1232555 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 14 Nov 2023 16:29:08 -0500 Subject: return 0 if c is EOF --- src/ctype/isupper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ctype/isupper.c b/src/ctype/isupper.c index ccc7ff23..b188dc28 100644 --- a/src/ctype/isupper.c +++ b/src/ctype/isupper.c @@ -10,7 +10,7 @@ int isupper(int c) ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); - return map[c] & CT_UPPER; + return c == EOF ? 0 : map[c] & CT_UPPER; } /*** -- cgit v1.2.1