diff options
author | markw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-03-26 16:47:57 +0000 |
---|---|---|
committer | markw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-03-26 16:47:57 +0000 |
commit | dbaf5bc02ae6c17e90f0790a68f9fd5ad089db2a (patch) | |
tree | 3682ab34bf3dd8351fa27e55e9ed3385b8bc6849 /sed.c | |
parent | f3c650bf15d317b2bcc87692bad214154a32452c (diff) | |
download | busybox-w32-dbaf5bc02ae6c17e90f0790a68f9fd5ad089db2a.tar.gz busybox-w32-dbaf5bc02ae6c17e90f0790a68f9fd5ad089db2a.tar.bz2 busybox-w32-dbaf5bc02ae6c17e90f0790a68f9fd5ad089db2a.zip |
Applied patch from Anthony Towns that he posted to Debian bug tracking.
git-svn-id: svn://busybox.net/trunk/busybox@2197 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'sed.c')
-rw-r--r-- | sed.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -622,9 +622,10 @@ static void process_file(FILE *file) | |||
622 | if (sed_cmds[i].beg_match && sed_cmds[i].end_match) { | 622 | if (sed_cmds[i].beg_match && sed_cmds[i].end_match) { |
623 | if (still_in_range || regexec(sed_cmds[i].beg_match, line, 0, NULL, 0) == 0) { | 623 | if (still_in_range || regexec(sed_cmds[i].beg_match, line, 0, NULL, 0) == 0) { |
624 | line_altered += do_sed_command(&sed_cmds[i], line); | 624 | line_altered += do_sed_command(&sed_cmds[i], line); |
625 | still_in_range = 1; | 625 | if (still_in_range && regexec(sed_cmds[i].end_match, line, 0, NULL, 0) == 0) |
626 | if (regexec(sed_cmds[i].end_match, line, 0, NULL, 0) == 0) | ||
627 | still_in_range = 0; | 626 | still_in_range = 0; |
627 | else | ||
628 | still_in_range = 1; | ||
628 | } | 629 | } |
629 | } | 630 | } |
630 | 631 | ||