summaryrefslogtreecommitdiff
path: root/usr.bin/grep/binary.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2003-09-18 22:29:31 +0000
committerBob Beck <beck@cvs.openbsd.org>2003-09-18 22:29:31 +0000
commitbbd74fb8e6168111a001f7742bff819a1f37cc7d (patch)
tree3c9c47a969a65b92e314765ea8eeb5daf6fc05df /usr.bin/grep/binary.c
parent9d2ee097e0fadcee53d5e06d503ce30a27790c30 (diff)
make this test look for spaces as well, to match other cases
ok fgs@ ok deraadt@
Diffstat (limited to 'usr.bin/grep/binary.c')
-rw-r--r--usr.bin/grep/binary.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/grep/binary.c b/usr.bin/grep/binary.c
index 82ffe94b499..84805714355 100644
--- a/usr.bin/grep/binary.c
+++ b/usr.bin/grep/binary.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: binary.c,v 1.8 2003/09/07 07:53:44 tedu Exp $ */
+/* $OpenBSD: binary.c,v 1.9 2003/09/18 22:29:30 beck Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -66,7 +66,7 @@ gzbin_file(gzFile *f)
return 0;
for (i = 0; i < m; i++)
- if (!isprint(buf[i]))
+ if (!isprint(buf[i]) && !isspace(buf[i]))
return 1;
gzrewind(f);