fix substitution when replacing with &, we shouldnt check for an escape charcter. Its already been taken care of _somewhere_ else

This commit is contained in:
Glenn L McGrath 2003-04-09 07:51:43 +00:00
parent bd9b32bc0d
commit 2410386611

View File

@ -722,9 +722,8 @@ static void print_subst_w_backrefs(const char *line, const char *replace,
* fortunately, regmatch[0] contains the indicies to the whole matched
* expression (kinda seems like it was designed for just such a
* purpose...) */
else if (replace[i] == '&' && replace[i - 1] != '\\') {
else if (replace[i] == '&') {
int j;
for (j = regmatch[0].rm_so; j < regmatch[0].rm_eo; j++)
pipeputc(line[j]);
}