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:
parent
1a9ea82b97
commit
1977128380
|
|
@ -95,7 +95,8 @@ void INP2D(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
||||||
for (i = 0; i < max_i; i++)
|
for (i = 0; i < max_i; i++)
|
||||||
if (i < numnodes)
|
if (i < numnodes)
|
||||||
IFC (bindNode, (ckt, fast, i + 1, node[i]));
|
IFC (bindNode, (ckt, fast, i + 1, node[i]));
|
||||||
else
|
else if (thismodel->INPmodType != INPtypelook("NUMD")
|
||||||
|
&& (thismodel->INPmodType != INPtypelook("NUMD2")))
|
||||||
GENnode(fast)[i] = -1;
|
GENnode(fast)[i] = -1;
|
||||||
|
|
||||||
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
|
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue