diff --git a/src/frontend/parser/backq.c b/src/frontend/parser/backq.c index 3dfe75bdf..46fae83d0 100644 --- a/src/frontend/parser/backq.c +++ b/src/frontend/parser/backq.c @@ -37,9 +37,8 @@ cp_bquote(wordlist *wlist) while (t < s) wbuf[i++] = *t++; wbuf[i] = '\0'; - (void) strcpy(buf, ++s); + (void) strcpy(buf, ++t); s = buf; - t++; while (*s && (*s != cp_back)) { t++; /* Get s and t past the next backquote. */ s++; diff --git a/src/frontend/variable.c b/src/frontend/variable.c index 683f8faee..f52c79171 100644 --- a/src/frontend/variable.c +++ b/src/frontend/variable.c @@ -691,9 +691,8 @@ cp_variablesubst(wordlist *wlist) while (t < s) wbuf[i++] = *t++; wbuf[i] = '\0'; - (void) strcpy(buf, ++s); + (void) strcpy(buf, ++t); s = buf; - t++; while (*s && (isalphanum(*s) || strchr(VALIDCHARS, *s))) { /* Get s and t past the end of the var name. */ t++;