From aedf9d0eb5d3b33e47a7a1eb152629116c30a813 Mon Sep 17 00:00:00 2001 From: dwarning Date: Tue, 5 Jan 2021 09:16:29 +0100 Subject: [PATCH] correct choice for both r model types --- src/spicelib/parser/inp2r.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/spicelib/parser/inp2r.c b/src/spicelib/parser/inp2r.c index 7bdb6e239..2b724a3ca 100644 --- a/src/spicelib/parser/inp2r.c +++ b/src/spicelib/parser/inp2r.c @@ -51,11 +51,7 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, struct card *current) #endif if (mytype < 0) { - if ((mytype = INPtypelook("Resistor")) < 0 -#ifdef ADMS - || (mytype = INPtypelook("r2_cmc")) < 0 -#endif - ){ + if ((mytype = INPtypelook("Resistor")) < 0) { LITERR("Device type Resistor not supported by this binary\n"); return; } @@ -153,7 +149,11 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, struct card *current) INPinsert(&model, tab); current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { - if (mytype != thismodel->INPmodType) { + if ((INPtypelook("Resistor") != thismodel->INPmodType) +#ifdef ADMS + && (INPtypelook("r2_cmc") != thismodel->INPmodType) +#endif + ) { LITERR("incorrect model type for resistor"); return; }