diff --git a/gnu/usr.bin/grep/grep.c b/gnu/usr.bin/grep/grep.c index 0353e26a33e..8e93267ccdf 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 */