diff --git a/builtin.cpp b/builtin.cpp index 219363b3c..becff9324 100644 --- a/builtin.cpp +++ b/builtin.cpp @@ -3540,6 +3540,7 @@ static int builtin_switch( parser_t &parser, wchar_t **argv ) parser.current_block->state1() = argv[1]; parser.current_block->skip=1; parser.current_block->state2() = 0; + res = proc_get_last_status(); } return res; @@ -3568,7 +3569,7 @@ static int builtin_case( parser_t &parser, wchar_t **argv ) if( parser.current_block->state2() ) { - return STATUS_BUILTIN_OK; + return proc_get_last_status(); } for( i=1; i