findsubckt(), fix lvalue
This commit is contained in:
parent
78147c2bd9
commit
cd05eb1d50
|
|
@ -547,7 +547,7 @@ 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 *k_ptr;
|
||||
const char *k_ptr = s + strlen(s);
|
||||
|
||||
entry_t *entry; /* symbol table entry */
|
||||
SPICE_DSTRING ustr; /* u= subckt name is last token in string s */
|
||||
|
|
@ -556,15 +556,13 @@ findsubckt(dico_t *dico, const char * const s)
|
|||
|
||||
spice_dstring_init(&ustr);
|
||||
|
||||
(k_ptr - s) = (int) strlen(s);
|
||||
|
||||
while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] <= ' '))
|
||||
(k_ptr - s)--;
|
||||
k_ptr--;
|
||||
|
||||
j = (int) (k_ptr - s);
|
||||
|
||||
while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] > ' '))
|
||||
(k_ptr - s)--;
|
||||
k_ptr--;
|
||||
|
||||
pscopy_up(&ustr, s, (int) (k_ptr - s) + 1, j - (int) (k_ptr - s));
|
||||
entry = entrynb(dico, spice_dstring_value(&ustr));
|
||||
|
|
|
|||
Loading…
Reference in New Issue