Selaa lähdekoodia

Deal properly with empty fields

Wichert Akkerman 25 vuotta sitten
vanhempi
commit
20c36bdd7a
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      main/showpkg.c

+ 2 - 0
main/showpkg.c

@@ -189,6 +189,8 @@ void show1package(const struct lstitem* head, struct pkginfo *pkg) {
 					char* i;
 
 					fip->wcall(&fb,pkg,&pkg->installed,fip);
+					if (!fb.used)
+						break;
 					/* Bugger, wcall adds the fieldname and a trailing newline we
 					 * do not need. We should probably improve wcall to only do that
 					 * optionally, but this will do for now (ie this is a TODO)