Prevent crash if port number is less than 1.
This commit is contained in:
parent
45850c07dc
commit
7f30055f22
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue