summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ctype/isupper.c2
1 files changed, 1 insertions, 1 deletions
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;
}
/***