Commit d2474dec authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

cmd.exe: EXIT /b skips any residual commands.

parent de4c6970
......@@ -2053,7 +2053,7 @@ int WCMD_volume (int mode, WCHAR *path) {
*
*/
void WCMD_exit (void) {
void WCMD_exit (CMD_LIST **cmdList) {
static const WCHAR parmB[] = {'/','B','\0'};
int rc = atoiW(param1); /* Note: atoi of empty parameter is 0 */
......@@ -2061,6 +2061,7 @@ void WCMD_exit (void) {
if (context && lstrcmpiW(quals, parmB) == 0) {
errorlevel = rc;
context -> skip_rest = TRUE;
*cmdList = NULL;
} else {
ExitProcess(rc);
}
......
......@@ -50,7 +50,7 @@ void WCMD_directory (WCHAR *);
void WCMD_echo (const WCHAR *);
void WCMD_endlocal (void);
void WCMD_enter_paged_mode(const WCHAR *);
void WCMD_exit (void);
void WCMD_exit (CMD_LIST **cmdList);
void WCMD_for (WCHAR *, CMD_LIST **cmdList);
void WCMD_give_help (WCHAR *command);
void WCMD_goto (CMD_LIST **cmdList);
......
......@@ -799,7 +799,7 @@ void WCMD_process_command (WCHAR *command, CMD_LIST **cmdList)
WCMD_more(p);
break;
case WCMD_EXIT:
WCMD_exit ();
WCMD_exit (cmdList);
break;
default:
WCMD_run_program (whichcmd, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment