diff options
Diffstat (limited to 'contrib/file/src/ascmagic.c')
-rw-r--r-- | contrib/file/src/ascmagic.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/file/src/ascmagic.c b/contrib/file/src/ascmagic.c index baa95ab..85a973e 100644 --- a/contrib/file/src/ascmagic.c +++ b/contrib/file/src/ascmagic.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: ascmagic.c,v 1.95 2016/05/03 16:10:37 christos Exp $") +FILE_RCSID("@(#)$File: ascmagic.c,v 1.97 2016/06/27 20:56:25 christos Exp $") #endif /* lint */ #include "magic.h" @@ -144,8 +144,10 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf, (size_t)(utf8_end - utf8_buf), NULL, NULL, TEXTTEST, text)) == 0) rv = -1; - if ((ms->flags & (MAGIC_APPLE|MAGIC_EXTENSION))) - return rv == -1 ? 0 : 1; + if ((ms->flags & (MAGIC_APPLE|MAGIC_EXTENSION))) { + rv = rv == -1 ? 0 : 1; + goto done; + } } if ((ms->flags & (MAGIC_APPLE|MAGIC_EXTENSION))) return 0; |