Prevent crash if port number is less than 1.
This commit is contained in:
parent
e0ee0bf131
commit
d0e91f58b3
|
|
@ -76,7 +76,7 @@ VSRCtemp(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
if (!here->VSRCportZ0Given)
|
if (!here->VSRCportZ0Given)
|
||||||
here->VSRCportZ0 = 50.0;
|
here->VSRCportZ0 = 50.0;
|
||||||
|
|
||||||
here->VSRCisPort = here->VSRCportZ0 > 0.0;
|
here->VSRCisPort = here->VSRCportZ0 > 0.0 && here->VSRCportNum > 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
here->VSRCisPort = FALSE;
|
here->VSRCisPort = FALSE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue