Browse Source

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)
pre-master-46
Holger Vogt 5 years ago
parent
commit
1977128380
  1. 3
      src/spicelib/parser/inp2d.c

3
src/spicelib/parser/inp2d.c

@ -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));

Loading…
Cancel
Save