getword(), substitue s = s - 1

This commit is contained in:
rlar 2016-05-01 17:36:12 +02:00
parent f96eb16255
commit 51c9f93b7a
1 changed files with 3 additions and 1 deletions

View File

@ -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);