[BusyBox] [patch] Why backrefs didn't work.
Rob Landley
rob at landley.net
Wed Oct 1 06:41:34 UTC 2003
Sigh.
--- busybox/editors/sed.c 2003-09-30 22:06:15.000000000 -0500
+++ busybox-new/editors/sed.c 2003-10-01 01:34:59.664680544 -0500
@@ -569,7 +568,7 @@
/* go through the replacement string */
for (i = 0; replace[i]; i++) {
/* if we find a backreference (\1, \2, etc.) print the backref'ed * text */
- if (replace[i] == '\\' && replace[i+1]>0 && replace[i+1]<=9) {
+ if (replace[i] == '\\' && replace[i+1]>'0' && replace[i+1]<='9') {
int backref=replace[++i]-'0';
/* print out the text held in regmatch[backref] */
Rob
More information about the busybox
mailing list