findsubckt(), swap name_b and name_e in the prolog

This commit is contained in:
rlar 2017-11-18 18:47:59 +01:00
parent 61f3ecffd6
commit 9e1a6b85ff
1 changed files with 5 additions and 5 deletions

View File

@ -547,8 +547,8 @@ findsubckt(dico_t *dico, const char * const s)
/* input: s is a subcircuit invocation line.
returns 0 if not found, else the stored definition line number value */
{
const char *name_b = s + strlen(s);
const char *name_e;
const char *name_e = s + strlen(s);
const char *name_b;
entry_t *entry; /* symbol table entry */
SPICE_DSTRING ustr; /* u= subckt name is last token in string s */
@ -556,10 +556,10 @@ findsubckt(dico_t *dico, const char * const s)
spice_dstring_init(&ustr);
while ((name_b > s) && (name_b[-1] <= ' '))
name_b--;
while ((name_e > s) && (name_e[-1] <= ' '))
name_e--;
name_e = name_b;
name_b = name_e;
while ((name_b > s) && (name_b[-1] > ' '))
name_b--;