diff options
-rw-r--r-- | shell/hush.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c index 336de75ad..4c2ed6cea 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -7874,6 +7874,8 @@ static int run_list(struct pipe *pi) | |||
7874 | #endif | 7874 | #endif |
7875 | #if ENABLE_HUSH_CASE | 7875 | #if ENABLE_HUSH_CASE |
7876 | if (rword == RES_CASE) { | 7876 | if (rword == RES_CASE) { |
7877 | /* Case which does not match and execute anything still sets $? to 0 */ | ||
7878 | G.last_exitcode = rcode = EXIT_SUCCESS; | ||
7877 | case_word = expand_strvec_to_string(pi->cmds->argv); | 7879 | case_word = expand_strvec_to_string(pi->cmds->argv); |
7878 | continue; | 7880 | continue; |
7879 | } | 7881 | } |