summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath2003-09-15 05:42:05 +0000
committerGlenn L McGrath2003-09-15 05:42:05 +0000
commit73116311e561212729debc1483c414aa184cc591 (patch)
treeec244cd6a097b185848c1bd4d8bdff8bb0793809
parent65f9dc01f35aac8ee3ee44b8369a30b118fafef9 (diff)
downloadbusybox-73116311e561212729debc1483c414aa184cc591.zip
busybox-73116311e561212729debc1483c414aa184cc591.tar.gz
Fix for the sed-append-next-line test
-rw-r--r--editors/sed.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/editors/sed.c b/editors/sed.c
index b73d660..00ed208 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1001,6 +1001,11 @@ static void process_file(FILE * file)
strcat(pattern_space, next_line);
next_line = bb_get_chomped_line_from_file(file);
linenum++;
+ } else {
+ /* Jump to end of script and exist */
+ deleted = 1;
+ free(next_line);
+ next_line = NULL;
}
break;
case 't':