diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index 42c2c3e6d..00399ee47 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -702,10 +702,10 @@ nupa_copy(struct card *deck) spice_dstring_init(&u); s_end = s + (int) strlen(s); - while ((s_end - s > 0) && (s[s_end - s - 1] <= ' ')) + while (s_end > s && s_end[-1] <= ' ') s_end--; - pscopy(&u, s, s + (s_end - s)); /* strip trailing space, CrLf and so on */ + pscopy(&u, s, s_end); /* strip trailing space, CrLf and so on */ dicoS->srcline = linenum; if ((!inexpansionS) && (linenum >= 0) && (linenum <= dynmaxline)) {