diff --git a/ChangeLog b/ChangeLog
index 0adef4fdd..22971c217 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-21 Paolo Nenzi
+
+ * src/spicelib/parser/inp2q.c: Added patch from Hitoshi Tanaka to
+ fix error in old BJT devices (that do not have fifth node).
+
2006-02-21 Paolo Nenzi
* src/frontend/subckt.c, src/spicelib/parser/inp2q.c,
diff --git a/src/spicelib/parser/inp2q.c b/src/spicelib/parser/inp2q.c
index c7f54e92e..93333c7c1 100644
--- a/src/spicelib/parser/inp2q.c
+++ b/src/spicelib/parser/inp2q.c
@@ -145,11 +145,17 @@ void INP2Q(void *ckt, INPtables * tab, card * current, void *gnode)
IFC(bindNode, (ckt, fast, 2, node2));
IFC(bindNode, (ckt, fast, 3, node3));
IFC(bindNode, (ckt, fast, 4, node4));
- if (nodeflag) {
- IFC(bindNode, (ckt, fast, 5, node5));
- } else {
- ((GENinstance *) fast)->GENnode5 = -1;
- }
+
+ if ((type == INPtypelook ("hicum0")) ||
+ (type == INPtypelook ("hicum2")) ||
+ (type == INPtypelook ("mextram")) )
+ {
+ if (nodeflag) {
+ IFC(bindNode, (ckt, fast, 5, node5));
+ } else {
+ ((GENinstance *) fast)->GENnode5 = -1;
+ }
+ }
PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab));
if (waslead) {
#ifdef CIDER