diff options
| author | Xin LI <delphij@FreeBSD.org> | 2016-11-07 07:26:06 +0000 | 
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2016-11-07 07:26:06 +0000 | 
| commit | 46a30e2e108c3996f8c1ef41888011c2a5cedaf7 (patch) | |
| tree | d5b3320c0abb93ce4b48892c8cf3704e4a3ed009 /src/ascmagic.c | |
| parent | 581c312f134935d421daea8ff9efe57e66a2beab (diff) | |
Diffstat (limited to 'src/ascmagic.c')
| -rw-r--r-- | src/ascmagic.c | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/src/ascmagic.c b/src/ascmagic.c index baa95aba2df5..85a973e4fe2e 100644 --- a/src/ascmagic.c +++ b/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; | 
