From 82d760080de95e5e421e4610c11f1b05fd5cea6e Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Tue, 29 Apr 2008 01:11:39 +0000 Subject: [PATCH] check for <= 0 not just 0 --- src/apprentice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apprentice.c b/src/apprentice.c index 57693860..c4d88ebc 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -49,7 +49,7 @@ #include #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.133 2008/04/04 15:01:09 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.134 2008/04/29 01:11:39 christos Exp $") #endif /* lint */ #define EATAB {while (isascii((unsigned char) *l) && \ @@ -550,7 +550,7 @@ set_test_type(struct magic *mstart, struct magic *m) case FILE_REGEX: case FILE_SEARCH: /* binary test if pattern is not text */ - if (file_looks_utf8(m->value.s, m->vallen, NULL, NULL) == 0) + if (file_looks_utf8(m->value.s, m->vallen, NULL, NULL) <= 0) mstart->flag |= BINTEST; break; case FILE_DEFAULT: -- 2.50.1