xpressn.c, reorder `dicostack_pop()'

This commit is contained in:
rlar 2014-08-09 19:38:25 +02:00
parent f4480c1cb9
commit 4592c1af97
1 changed files with 5 additions and 5 deletions

View File

@ -317,7 +317,11 @@ dicostack_pop(tdico *dico)
NGHASHPTR htable_p; /* current hash table */
NGHASHITER iter; /* hash iterator - thread safe */
if (dico->stack_depth > 0) {
if (dico->stack_depth <= 0) {
message(dico, " Subckt Stack underflow.\n");
return;
}
/* -----------------------------------------------------------------
* Keep instance parameters around by transferring current local
* scope variables to an instance qualified hash table.
@ -347,10 +351,6 @@ dicostack_pop(tdico *dico)
dico->inst_name[dico->stack_depth] = NULL;
dico->local_symbols[dico->stack_depth] = NULL;
dico->stack_depth--;
} else {
message(dico, " Subckt Stack underflow.\n");
}
}