mirror of
https://git.busybox.net/busybox
synced 2026-01-31 16:43:21 +00:00
hush: non-matching "case" statement sets $? to 0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
672a55e606
commit
30bfcf612b
1 changed files with 2 additions and 0 deletions
|
|
@ -7874,6 +7874,8 @@ static int run_list(struct pipe *pi)
|
|||
#endif
|
||||
#if ENABLE_HUSH_CASE
|
||||
if (rword == RES_CASE) {
|
||||
/* Case which does not match and execute anything still sets $? to 0 */
|
||||
G.last_exitcode = rcode = EXIT_SUCCESS;
|
||||
case_word = expand_strvec_to_string(pi->cmds->argv);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue