aboutsummaryrefslogtreecommitdiff
path: root/editors/sed.c
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-15 12:07:48 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-15 12:07:48 +0000
commit181bdaae4881009126ff34892ceb1fba0575b3d4 (patch)
tree6636a19bb0c4433f719ba54dd5de699bd024468f /editors/sed.c
parent99340a6d66aea165e8ee42ac72fc21c8185d1ad0 (diff)
downloadbusybox-w32-181bdaae4881009126ff34892ceb1fba0575b3d4.tar.gz
busybox-w32-181bdaae4881009126ff34892ceb1fba0575b3d4.tar.bz2
busybox-w32-181bdaae4881009126ff34892ceb1fba0575b3d4.zip
Fix a simple mistake with pattern space, and add a test for it
git-svn-id: svn://busybox.net/trunk/busybox@7529 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'editors/sed.c')
-rw-r--r--editors/sed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 05eb744a4..da15c4d06 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1070,9 +1070,9 @@ static void process_file(FILE * file)
1070 } 1070 }
1071 pattern_space = xrealloc(pattern_space, pattern_space_size + hold_space_size); 1071 pattern_space = xrealloc(pattern_space, pattern_space_size + hold_space_size);
1072 if (pattern_space_size == 2) { 1072 if (pattern_space_size == 2) {
1073 strcat(pattern_space, "\n");
1074 } else {
1075 strcpy(pattern_space, "\n"); 1073 strcpy(pattern_space, "\n");
1074 } else {
1075 strcat(pattern_space, "\n");
1076 } 1076 }
1077 if (hold_space) { 1077 if (hold_space) {
1078 strcat(pattern_space, hold_space); 1078 strcat(pattern_space, hold_space);