mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 13:57:32 +02:00
nest, initialize lcc' with last' instead of NULL to avoid special handling for empty bodies
This commit is contained in:
@@ -446,7 +446,7 @@ doit(struct line *deck) {
|
|||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int nest = 1;
|
int nest = 1;
|
||||||
lcc = NULL;
|
lcc = last;
|
||||||
for (c = last->li_next; c; c = c->li_next) {
|
for (c = last->li_next; c; c = c->li_next) {
|
||||||
if (ciprefix(sbend, c->li_line)) /* found a .ends */
|
if (ciprefix(sbend, c->li_line)) /* found a .ends */
|
||||||
nest--;
|
nest--;
|
||||||
@@ -468,8 +468,7 @@ doit(struct line *deck) {
|
|||||||
|
|
||||||
|
|
||||||
sssfree = sss = alloc(struct subs);
|
sssfree = sss = alloc(struct subs);
|
||||||
if (!lcc) /* if lcc is null, then no .ends was found. */
|
|
||||||
lcc = last;
|
|
||||||
if ( use_numparams==FALSE )
|
if ( use_numparams==FALSE )
|
||||||
lcc->li_next = NULL; /* shouldn't we free some memory here????? */
|
lcc->li_next = NULL; /* shouldn't we free some memory here????? */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user