Przeglądaj źródła

Deal properly with empty fields

Wichert Akkerman 25 lat temu
rodzic
commit
20c36bdd7a
1 zmienionych plików z 2 dodań i 0 usunięć
  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;
 					char* i;
 
 
 					fip->wcall(&fb,pkg,&pkg->installed,fip);
 					fip->wcall(&fb,pkg,&pkg->installed,fip);
+					if (!fb.used)
+						break;
 					/* Bugger, wcall adds the fieldname and a trailing newline we
 					/* Bugger, wcall adds the fieldname and a trailing newline we
 					 * do not need. We should probably improve wcall to only do that
 					 * do not need. We should probably improve wcall to only do that
 					 * optionally, but this will do for now (ie this is a TODO)
 					 * optionally, but this will do for now (ie this is a TODO)