diff options
Diffstat (limited to 'ext/fileinfo/libmagic/softmagic.c')
| -rw-r--r-- | ext/fileinfo/libmagic/softmagic.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/fileinfo/libmagic/softmagic.c b/ext/fileinfo/libmagic/softmagic.c index f74bf0fc68..2dea6ab15a 100644 --- a/ext/fileinfo/libmagic/softmagic.c +++ b/ext/fileinfo/libmagic/softmagic.c @@ -260,11 +260,14 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, * make sure that we have a separator first. */ if (*m->desc) { - printed_something = 1; if ((e = handle_annotation(ms, m)) != 0) return e; - if (print_sep(ms, firstline) == -1) - return -1; + if (!printed_something) { + printed_something = 1; + if (print_sep(ms, firstline) + == -1) + return -1; + } } /* * This continuation matched. Print |
