aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-04-09 07:51:43 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-04-09 07:51:43 +0000
commitdb8a591bc78c314c1584c55e69a41948cca4dc79 (patch)
tree9a663dfedb235ede01df7efd69163a67ee6f1d97
parent59364224d0f1602768f758f2556a44d5910829d8 (diff)
downloadbusybox-w32-db8a591bc78c314c1584c55e69a41948cca4dc79.tar.gz
busybox-w32-db8a591bc78c314c1584c55e69a41948cca4dc79.tar.bz2
busybox-w32-db8a591bc78c314c1584c55e69a41948cca4dc79.zip
fix substitution when replacing with &, we shouldnt check for an escape charcter. Its already been taken care of _somewhere_ else
git-svn-id: svn://busybox.net/trunk/busybox@6788 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--editors/sed.c3
1 files changed, 1 insertions, 2 deletions
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,
722 * fortunately, regmatch[0] contains the indicies to the whole matched 722 * fortunately, regmatch[0] contains the indicies to the whole matched
723 * expression (kinda seems like it was designed for just such a 723 * expression (kinda seems like it was designed for just such a
724 * purpose...) */ 724 * purpose...) */
725 else if (replace[i] == '&' && replace[i - 1] != '\\') { 725 else if (replace[i] == '&') {
726 int j; 726 int j;
727
728 for (j = regmatch[0].rm_so; j < regmatch[0].rm_eo; j++) 727 for (j = regmatch[0].rm_so; j < regmatch[0].rm_eo; j++)
729 pipeputc(line[j]); 728 pipeputc(line[j]);
730 } 729 }