Browse Source

Prevent crash if port number is less than 1.

pre-master-46
Holger Vogt 2 years ago
parent
commit
7f30055f22
  1. 2
      src/spicelib/devices/vsrc/vsrctemp.c

2
src/spicelib/devices/vsrc/vsrctemp.c

@ -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…
Cancel
Save