From c8b1d18289eaa743b363adab48123e96eac2aff9 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 10 Mar 2017 18:30:14 +0100 Subject: [PATCH] inp2q.c, #11/23, move code down Note: here i==3 and nodeflag==4 --- src/spicelib/parser/inp2q.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/spicelib/parser/inp2q.c b/src/spicelib/parser/inp2q.c index fdf2955fe..4fb029db3 100644 --- a/src/spicelib/parser/inp2q.c +++ b/src/spicelib/parser/inp2q.c @@ -75,8 +75,6 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode) thismodel = NULL; /* See if 4th token after device specification is a model name */ if (INPlookMod(model)) { - /* 3-terminal device - substrate to ground */ - node[3] = gnode; INPinsert(&model, tab); current->error = INPgetMod(ckt, model, &thismodel, tab); } else { @@ -111,6 +109,12 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode) } } + if (i == 3) { + /* 3-terminal device - substrate to ground */ + node[3] = gnode; + nodeflag = 4; + } + #ifdef TRACE printf("INP2Q: Looking up model\n"); #endif