From 59c9ae1d602c45b4fabe2300fe1a56a34c1b2b0f Mon Sep 17 00:00:00 2001 From: ripsaw8080 Date: Wed, 5 Aug 2015 14:56:36 +0000 Subject: [PATCH] Fix shell PAUSE command when reading extended keys, and make TYPE command more compatible by stopping at EOF byte. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3927 --- src/shell/shell_cmds.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index f4ef6840..e63ea6c5 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -944,6 +944,7 @@ nextfile: do { n=1; DOS_ReadFile(handle,&c,&n); + if (c==0x1a) break; // stop at EOF DOS_WriteFile(STDOUT,&c,&n); } while (n); DOS_CloseFile(handle); @@ -958,7 +959,8 @@ void DOS_Shell::CMD_PAUSE(char * args){ HELP("PAUSE"); WriteOut(MSG_Get("SHELL_CMD_PAUSE")); Bit8u c;Bit16u n=1; - DOS_ReadFile (STDIN,&c,&n); + DOS_ReadFile(STDIN,&c,&n); + if (c==0) DOS_ReadFile(STDIN,&c,&n); // read extended key } void DOS_Shell::CMD_CALL(char * args){