Prevent crash when CIDER diode models are used.

There is no third node in NUMD or NUMD2, so don't set
GENnode(fast)[i]. This patch fixes a bug introduced in
4895a4b5a ("Diode model with selfheating option", 2021-04-11)
This commit is contained in:
Holger Vogt 2021-07-10 14:11:56 +02:00
parent 1a9ea82b97
commit 1977128380
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ void INP2D(CKTcircuit *ckt, INPtables * tab, struct card *current)
for (i = 0; i < max_i; i++)
if (i < numnodes)
IFC (bindNode, (ckt, fast, i + 1, node[i]));
else
else if (thismodel->INPmodType != INPtypelook("NUMD")
&& (thismodel->INPmodType != INPtypelook("NUMD2")))
GENnode(fast)[i] = -1;
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));