From: Glenn L McGrath Date: Wed, 9 Apr 2003 07:51:43 +0000 (-0000) Subject: fix substitution when replacing with &, we shouldnt check for an escape charcter... X-Git-Tag: 1_00_pre1~121 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2410386611e104ee4e078b2182e3b9b2f9f3adff;p=oweals%2Fbusybox.git fix substitution when replacing with &, we shouldnt check for an escape charcter. Its already been taken care of _somewhere_ else --- diff --git a/editors/sed.c b/editors/sed.c index db3171879..912318c04 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -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]); }