diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-05-13 16:29:34 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-05-13 16:30:39 +0200 |
commit | 0545bfa841540a0d7d7e2953bc205eda64144c2e (patch) | |
tree | eff3d12359575675aefd94eca2d501fc2ebdcfbc /editors | |
parent | 15021f393d3d19d689028fceb5c35da930059430 (diff) | |
download | busybox-w32-0545bfa841540a0d7d7e2953bc205eda64144c2e.tar.gz busybox-w32-0545bfa841540a0d7d7e2953bc205eda64144c2e.tar.bz2 busybox-w32-0545bfa841540a0d7d7e2953bc205eda64144c2e.zip |
sed: fix /regex/,+N match triggering only once, closes 11871
function old new delta
process_files 2235 2246 +11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/sed.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editors/sed.c b/editors/sed.c index bb39de149..57d3dda16 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -1097,6 +1097,8 @@ static void process_files(void) | |||
1097 | int old_matched, matched; | 1097 | int old_matched, matched; |
1098 | 1098 | ||
1099 | old_matched = sed_cmd->in_match; | 1099 | old_matched = sed_cmd->in_match; |
1100 | if (!old_matched) | ||
1101 | sed_cmd->end_line = sed_cmd->end_line_orig; | ||
1100 | 1102 | ||
1101 | /* Determine if this command matches this line: */ | 1103 | /* Determine if this command matches this line: */ |
1102 | 1104 | ||