]> granicus.if.org Git - file/commitdiff
PR/318: Klortho: if handle_annotation prints something, mark it as printed.
authorChristos Zoulas <christos@zoulas.com>
Wed, 8 Jan 2014 22:02:06 +0000 (22:02 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 8 Jan 2014 22:02:06 +0000 (22:02 +0000)
src/softmagic.c

index 35b51ebe68324848c349c16c4d9e4b5f19733c1e..ec713649ba1d6c7da8426a9162849f4772033dd0 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.169 2013/12/05 17:02:34 christos Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.170 2014/01/06 02:25:32 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -194,6 +194,8 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
                }
 
                if ((e = handle_annotation(ms, m)) != 0) {
+                       *need_separator = 1;
+                       *printed_something = 1;
                        *returnval = 1;
                        return e;
                }
@@ -282,6 +284,8 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
                                } else
                                        ms->c.li[cont_level].got_match = 1;
                                if ((e = handle_annotation(ms, m)) != 0) {
+                                       *need_separator = 1;
+                                       *printed_something = 1;
                                        *returnval = 1;
                                        return e;
                                }