From 0030c5ea720f492fcaed2cd5ebb52f7ad54170fd Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 14 Nov 2023 16:31:31 -0500 Subject: return 0 if c is EOF --- src/ctype/isprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ctype/isprint.c') diff --git a/src/ctype/isprint.c b/src/ctype/isprint.c index e7843442..b0aa2121 100644 --- a/src/ctype/isprint.c +++ b/src/ctype/isprint.c @@ -10,7 +10,7 @@ int isprint(int c) ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF); - return map[c] & CT_PRINT; + return c == EOF ? 0 : map[c] & CT_PRINT; } /*** -- cgit v1.2.1