1
0
Fork 0

Print a newline after user makes a choice

Previously, this command expected newline to be injected by the shell
(which was incorrect behaviour, as shell was skipping it in batch
files).
This commit is contained in:
Patryk Obara 2019-12-27 16:12:26 +01:00 committed by Patryk Obara
parent 1bdb67b2c3
commit 5c1c653098

View file

@ -1367,7 +1367,8 @@ void DOS_Shell::CMD_CHOICE(char * args){
DOS_ReadFile (STDIN,&c,&n);
} while (!c || !(ptr = strchr(rem,(optS?c:toupper(c)))));
c = optS?c:(Bit8u)toupper(c);
DOS_WriteFile (STDOUT,&c, &n);
DOS_WriteFile(STDOUT, &c, &n);
WriteOut_NoParsing("\n");
dos.return_code = (Bit8u)(ptr-rem+1);
}