From 0be258a808963fbd44eb51f5e6ad001310980d8a Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 25 Mar 2012 19:07:15 +0200 Subject: [PATCH] nest, initialize `lcc' with `last' instead of NULL to avoid special handling for empty bodies --- src/frontend/subckt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index b66f28cc0..b522c9c41 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -446,7 +446,7 @@ doit(struct line *deck) { */ { int nest = 1; - lcc = NULL; + lcc = last; for (c = last->li_next; c; c = c->li_next) { if (ciprefix(sbend, c->li_line)) /* found a .ends */ nest--; @@ -468,8 +468,7 @@ doit(struct line *deck) { sssfree = sss = alloc(struct subs); - if (!lcc) /* if lcc is null, then no .ends was found. */ - lcc = last; + if ( use_numparams==FALSE ) lcc->li_next = NULL; /* shouldn't we free some memory here????? */