From cbd38fdc9c1cf1f163be03d213847bb50c6fb96b Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 23 Nov 2017 18:33:57 +0100 Subject: [PATCH] findsubname(), use skip_back_ws() --- src/frontend/numparam/spicenum.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index 992f4889b..bf60f00ea 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -161,10 +161,8 @@ findsubname(dico_t *dico, SPICE_DSTRINGPTR dstr_p) while (p > s) { /* skip space, then non-space */ - while ((p > s) && (p[-1] <= ' ')) - p--; + char *p_end = p = skip_back_ws(p, s); /* at p_end: space */ - char *p_end = p; /* at p_end: space */ while ((p > s) && (p[-1] > ' ')) { if (p[-1] == '}') {