diff --git a/src/wireviz/DataClasses.py b/src/wireviz/DataClasses.py index 47bffc83..1980e1b3 100644 --- a/src/wireviz/DataClasses.py +++ b/src/wireviz/DataClasses.py @@ -233,7 +233,7 @@ def get_qty_multiplier(self, qty_multiplier: Optional[ConnectorMultiplier]) -> i elif qty_multiplier == "populated": return sum(self.visible_pins.values()) elif qty_multiplier == 'unpopulated': - return (self.pincount - sum(self.visible_pins.values())) + return max(0, self.pincount - sum(self.visible_pins.values())) else: raise ValueError( f"invalid qty multiplier parameter for connector {qty_multiplier}"