summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/grep/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/grep/grep.c b/gnu/usr.bin/grep/grep.c
index 0353e26..8e93267 100644
--- a/gnu/usr.bin/grep/grep.c
+++ b/gnu/usr.bin/grep/grep.c
@@ -532,7 +532,7 @@ int isBinaryFile(fd)
/* look for non-printable chars */
for(i = 0; i < n; i++)
- if (!isprint(buf[i]) && !isspace(buf[i]))
+ if (!isprint((unsigned char)buf[i]) && !isspace((unsigned char)buf[i]))
return(1);
/* reset fd to begin of file */
OpenPOWER on IntegriCloud