findsubckt(), j ==> j_ptr - (const) s

This commit is contained in:
rlar 2017-11-18 18:43:37 +01:00
parent cd05eb1d50
commit 940eb2a258
1 changed files with 3 additions and 3 deletions

View File

@ -548,10 +548,10 @@ findsubckt(dico_t *dico, const char * const s)
returns 0 if not found, else the stored definition line number value */
{
const char *k_ptr = s + strlen(s);
const char *j_ptr;
entry_t *entry; /* symbol table entry */
SPICE_DSTRING ustr; /* u= subckt name is last token in string s */
int j;
int line; /* stored line number */
spice_dstring_init(&ustr);
@ -559,12 +559,12 @@ findsubckt(dico_t *dico, const char * const s)
while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] <= ' '))
k_ptr--;
j = (int) (k_ptr - s);
(j_ptr - s) = (int) (k_ptr - s);
while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] > ' '))
k_ptr--;
pscopy_up(&ustr, s, (int) (k_ptr - s) + 1, j - (int) (k_ptr - s));
pscopy_up(&ustr, s, (int) (k_ptr - s) + 1, (int) (j_ptr - s) - (int) (k_ptr - s));
entry = entrynb(dico, spice_dstring_value(&ustr));
if (entry && (entry->tp == NUPA_SUBCKT)) {