[BusyBox-cvs] busybox/editors sed.c,1.152,1.153

Glenn McGrath bug1 at busybox.net
Wed Oct 1 10:26:27 UTC 2003


Update of /var/cvs/busybox/editors
In directory winder:/tmp/cvs-serv491/editors

Modified Files:
	sed.c 
Log Message:
Patch from Rob Landley to fix backrefs


Index: sed.c
===================================================================
RCS file: /var/cvs/busybox/editors/sed.c,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -d -r1.152 -r1.153
--- sed.c	1 Oct 2003 06:45:11 -0000	1.152
+++ sed.c	1 Oct 2003 10:26:23 -0000	1.153
@@ -570,7 +570,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] */




More information about the busybox-cvs mailing list