diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-10-01 10:26:23 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-10-01 10:26:23 +0000 |
commit | 425e5f5bd5d0caf682639ac88b6b507ff0b27dc8 (patch) | |
tree | a369b9d5bda25e91385fd3efe8343531160f414e | |
parent | 31a410d2d5713faf538018f8f5fd1fd8d883e50c (diff) | |
download | busybox-w32-425e5f5bd5d0caf682639ac88b6b507ff0b27dc8.tar.gz busybox-w32-425e5f5bd5d0caf682639ac88b6b507ff0b27dc8.tar.bz2 busybox-w32-425e5f5bd5d0caf682639ac88b6b507ff0b27dc8.zip |
Patch from Rob Landley to fix backrefs
git-svn-id: svn://busybox.net/trunk/busybox@7586 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | editors/sed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c index 3d6d72c68..da06bf485 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -570,7 +570,7 @@ static void do_subst_w_backrefs(const char *line, const char *replace) | |||
570 | /* go through the replacement string */ | 570 | /* go through the replacement string */ |
571 | for (i = 0; replace[i]; i++) { | 571 | for (i = 0; replace[i]; i++) { |
572 | /* if we find a backreference (\1, \2, etc.) print the backref'ed * text */ | 572 | /* if we find a backreference (\1, \2, etc.) print the backref'ed * text */ |
573 | if (replace[i] == '\\' && replace[i+1]>0 && replace[i+1]<=9) { | 573 | if (replace[i] == '\\' && replace[i+1]>'0' && replace[i+1]<='9') { |
574 | int backref=replace[++i]-'0'; | 574 | int backref=replace[++i]-'0'; |
575 | 575 | ||
576 | /* print out the text held in regmatch[backref] */ | 576 | /* print out the text held in regmatch[backref] */ |