diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 20566fb16..4dd92c3ac 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -5506,12 +5506,10 @@ inp_modify_exp(char* expr) /* scan the expression */ s = expr; - while (*s != '\0') { - char c; - s = skip_ws(s); - if (*s == '\0') - break; - c = *s; + while (*(s = skip_ws(s))) { + + char c = *s; + wl_append_word(&wlist, &wl, NULL); if ((c == ',') || (c == '(') || (c == ')') ||