nupa_subcktcall(), reintroduce search for last occurence of the subckt name

This commit is contained in:
rlar 2017-11-25 18:36:50 +01:00
parent c2f519c191
commit a38b19bc0e
1 changed files with 10 additions and 1 deletions

View File

@ -1602,8 +1602,17 @@ nupa_subcktcall(dico_t *dico, char *s, char * const x, char * const inst_name)
scopy_up(&tstr, skip_non_ws(x));
char * const t_p = spice_dstring_value(&tstr);
char *jp = NULL;
char *jp = search_isolated_identifier(t_p, spice_dstring_value(&subname));
/* search for the last occurence of `subname' in the given line */
for (;;) {
char *next_p =
search_isolated_identifier(jp ? jp + 1 : t_p,
spice_dstring_value(&subname));
if (!next_p)
break;
jp = next_p;
}
if (jp) {