[BusyBox-cvs] busybox/editors sed.c,1.146,1.147

Glenn McGrath bug1 at busybox.net
Mon Sep 15 12:07:50 UTC 2003


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

Modified Files:
	sed.c 
Log Message:
Fix a simple mistake with pattern space, and add a test for it


Index: sed.c
===================================================================
RCS file: /var/cvs/busybox/editors/sed.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -d -r1.146 -r1.147
--- sed.c	15 Sep 2003 09:22:04 -0000	1.146
+++ sed.c	15 Sep 2003 12:07:46 -0000	1.147
@@ -1070,9 +1070,9 @@
 					}
 					pattern_space = xrealloc(pattern_space, pattern_space_size + hold_space_size);
 					if (pattern_space_size == 2) {
-						strcat(pattern_space, "\n");
-					} else {
 						strcpy(pattern_space, "\n");
+					} else {
+						strcat(pattern_space, "\n");
 					}
 					if (hold_space) {
 						strcat(pattern_space, hold_space);




More information about the busybox-cvs mailing list