aboutsummaryrefslogtreecommitdiff
path: root/bp.c
diff options
context:
space:
mode:
Diffstat (limited to 'bp.c')
-rw-r--r--bp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bp.c b/bp.c
index b01c5b4..6eb9c3a 100644
--- a/bp.c
+++ b/bp.c
@@ -155,7 +155,8 @@ static int is_text_file(const char *filename)
(void)close(fd);
if (len < 0) return 0;
for (ssize_t i = 0; i < len; i++)
- if (!isprint(buf[i])) return 0;
+ if (isascii(buf[i]) && !(isprint(buf[i]) || isspace(buf[i])))
+ return 0;
return 1;
}