From: Glenn L McGrath Date: Sun, 14 Sep 2003 07:59:28 +0000 (-0000) Subject: Preserve substitution flag value within the current line. X-Git-Tag: 1_00_pre4~192 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3fe475677a54fff6ce8a39e1d4a7e3d358aeed18;p=oweals%2Fbusybox.git Preserve substitution flag value within the current line. Fixed the following testcase # cat strings |./busybox sed -n -f test3.sed 1 1 2 c c # cat strings a b c --- diff --git a/editors/sed.c b/editors/sed.c index aa3ce024e..2be4ed174 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -902,7 +902,7 @@ static void process_file(FILE * file) } #endif /* we print the pattern_space once, unless we were told to be quiet */ - substituted = do_subst_command(sed_cmd, &pattern_space); + substituted |= do_subst_command(sed_cmd, &pattern_space); #ifdef CONFIG_FEATURE_SED_EMBEDED_NEWLINE /* undo HACK: escape newlines twice so regex can match them */