From f96eb16255980e5a667aa5ea5fde06e9c7332362 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 6 May 2016 20:32:14 +0200 Subject: [PATCH] getword(), (s < x) ==> (s - 1 < x - 1) --- src/frontend/numparam/xpressn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index 1bb9e4706..6325dca54 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -1321,7 +1321,7 @@ 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 < s_end) && !alfa(s[-1])) + while ((s-1 < s_end - 1) && !alfa(s[-1])) s++; spice_dstring_reinit(tstr_p);