70dc63f467546abc07a53a97a0e00fb8c250fd49
[busybox-power] / debian / patches / hotfixes / busybox-1.20.0-sed.patch
1 --- busybox-1.20.0/editors/sed.c
2 +++ busybox-1.20.0-sed/editors/sed.c
3 @@ -743,7 +743,7 @@ static int do_subst_command(sed_cmd_t *s
4                  */
5                 if (!G.regmatch[0].rm_so && !G.regmatch[0].rm_eo && match_count) {
6                         pipe_putc(*line++);
7 -                       continue;
8 +                       goto next;
9                 }
10  
11                 match_count++;
12 @@ -755,7 +755,7 @@ static int do_subst_command(sed_cmd_t *s
13                 ) {
14                         for (i = 0; i < G.regmatch[0].rm_eo; i++)
15                                 pipe_putc(*line++);
16 -                       continue;
17 +                       goto next;
18                 }
19  
20                 /* print everything before the match */
21 @@ -773,7 +773,7 @@ static int do_subst_command(sed_cmd_t *s
22                 /* if we're not doing this globally, get out now */
23                 if (sed_cmd->which_match != 0)
24                         break;
25 -
26 + next:
27                 if (*line == '\0')
28                         break;
29