commit: cf2affbb7bc8b84160f618b55cad0332c32b6d3a
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue May 14 20:14:31 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue May 14 20:14:31 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=cf2affbb
libq/dep: fix highlighting all deps when match atom array is empty
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
libq/dep.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libq/dep.c b/libq/dep.c
index 76d7b1e..49edf10 100644
--- a/libq/dep.c
+++ b/libq/dep.c
@@ -244,7 +244,9 @@ dep_print_tree(
if (root->type == DEP_OR)
fprintf(fp, "|| (");
if (root->info) {
- if (hlatoms != NULL && root->type == DEP_NORM) {
+ if (hlatoms != NULL && array_cnt(hlatoms) > 0 &&
+ root->type == DEP_NORM)
+ {
size_t i;
depend_atom *m;
char *oslot;