From 51c9f93b7ad5950c13e4004c13f30836c7cc296e Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 1 May 2016 17:36:12 +0200 Subject: [PATCH] getword(), substitue s = s - 1 --- src/frontend/numparam/xpressn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index 6325dca54..abd0bbee9 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -1321,8 +1321,10 @@ getword(const char *s, const char * const s_end, SPICE_DSTRINGPTR tstr_p) /* isolate a word from s after position "after". return i= last read+1 */ { s++; - while ((s-1 < s_end - 1) && !alfa(s[-1])) + s--; + while ((s < s_end - 1) && !alfa(*s)) s++; + s++; spice_dstring_reinit(tstr_p);