Prevent crash if port number is less than 1.

This commit is contained in:
Holger Vogt 2023-12-10 18:01:07 +01:00
parent 45850c07dc
commit 7f30055f22
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ VSRCtemp(GENmodel *inModel, CKTcircuit *ckt)
if (!here->VSRCportZ0Given)
here->VSRCportZ0 = 50.0;
here->VSRCisPort = here->VSRCportZ0 > 0.0;
here->VSRCisPort = here->VSRCportZ0 > 0.0 && here->VSRCportNum > 0;
}
else
here->VSRCisPort = FALSE;