Subject: For indirect magic, reset printed_something and need_separator so that (...) Origin: FILE5_43-59-ga960a2ad Upstream-Author: Christos Zoulas Date: Fri Oct 7 18:40:50 2022 +0000 for indirect magic, reset printed_something and need_separator so that we don't trigger printing a separator (Christoph Biedl) --- a/src/softmagic.c +++ b/src/softmagic.c @@ -1860,11 +1860,15 @@ for (mlp = ms->mlist[0]->next; mlp != ms->mlist[0]; mlp = mlp->next) { + int xprinted_something = 0; + int xneed_separator = 0; if ((rv = match(ms, mlp->magic, mlp->magic_rxcomp, mlp->nmagic, &bb, 0, BINTEST, text, 0, indir_count, - name_count, printed_something, need_separator, + name_count, &xprinted_something, &xneed_separator, NULL, NULL)) != 0) break; + *printed_something |= xprinted_something; + *need_separator |= xneed_separator; } if ((ms->flags & MAGIC_DEBUG) != 0)