From 09fbc0ee9727d0c6dc41126eca51dc5f19fd3003 Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 7 Mar 2017 21:13:47 +0100 Subject: [PATCH] inp2m.c, #6/9c, now fix model_numnodes() to prevent instance struct storage beeing overwritten. --- src/spicelib/parser/inp2m.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/spicelib/parser/inp2m.c b/src/spicelib/parser/inp2m.c index 68c6dd1c8..8a395d16b 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -16,17 +16,21 @@ Modified: 2001 Paolo Nenzi (Cider Integration) static int model_numnodes(int type) { - if (type == INPtypelook("B4SOI") || - type == INPtypelook("B3SOIPD") || - type == INPtypelook("B3SOIFD") || - type == INPtypelook("B3SOIDD") || - type == INPtypelook("HiSIMHV1") || - type == INPtypelook("HiSIMHV2") || - type == INPtypelook("SOI3")) + if (type == INPtypelook("B4SOI") || /* 7 ; B4SOInames */ + type == INPtypelook("B3SOIPD") || /* 7 ; B3SOIPDnames */ + type == INPtypelook("B3SOIFD") || /* 7 ; B3SOIFDnames */ + type == INPtypelook("B3SOIDD")) /* 7 ; B3SOIDDnames */ { return 7; } + if (type == INPtypelook("HiSIMHV1") || /* 6 ; HSMHVnames */ + type == INPtypelook("HiSIMHV2") || /* 6 ; HSMHV2names */ + type == INPtypelook("SOI3")) /* 6 ; SOI3names */ + { + return 6; + } + return 4; }