Only print the devices that are really used in the circuit

(don't print the 0 occurencies).
This commit is contained in:
Holger Vogt 2020-12-24 09:46:14 +01:00
parent aaec6be4c6
commit 86f5a9b819
1 changed files with 2 additions and 2 deletions

View File

@ -40,9 +40,9 @@ com_inventory(wordlist *wl)
devList = stat->STATdevNum;
out_init();
out_send("Circuit Inventory\n\n");
out_send("\nCircuit Inventory\n\n");
for (k = 0; k < ft_sim->numDevices; k++)
if (ft_sim->devices[k])
if (ft_sim->devices[k] && devList[k].instNum > 0)
out_printf("%s: %d\n",
ft_sim->devices[k]->name,
devList[k].instNum);