diff --git a/src/dos/dos.cpp b/src/dos/dos.cpp index 28e5663b..a421fe07 100644 --- a/src/dos/dos.cpp +++ b/src/dos/dos.cpp @@ -223,6 +223,10 @@ static Bitu DOS_21Handler(void) { free--; for(;;) { DOS_ReadFile(STDIN,&c,&n); + if (n == 0) // End of file + E_Exit("DOS:0x0a:Redirected input reached EOF"); + if (c == 10) // Line feed + continue; if (c == 8) { // Backspace if (read) { //Something to backspace. // STDOUT treats backspace as non-destructive.