From ee0367653bc28640cef7509f35d99e8dcf0a4b82 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sun, 12 Jan 2014 13:43:47 +0000 Subject: [PATCH] stdprn is now really prn and you can't read from it. Fixes a weird runtime that reads the PRN handle. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3858 --- src/dos/dos_devices.cpp | 4 ++++ src/shell/shell.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dos/dos_devices.cpp b/src/dos/dos_devices.cpp index b6659816..79d00eae 100644 --- a/src/dos/dos_devices.cpp +++ b/src/dos/dos_devices.cpp @@ -60,6 +60,10 @@ class device_LPT1 : public device_NUL { public: device_LPT1() { SetName("LPT1");} Bit16u GetInformation(void) { return 0x80A0; } + bool Read(Bit8u* data,Bit16u * size){ + DOS_SetError(DOSERR_ACCESS_DENIED); + return false; + } }; bool DOS_Device::Read(Bit8u * data,Bit16u * size) { diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 9cce9285..7bbcd143 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -651,7 +651,7 @@ void SHELL_Init() { DOS_ForceDuplicateEntry(1,0); /* "new" STDIN */ DOS_ForceDuplicateEntry(1,2); /* STDERR */ DOS_OpenFile("CON",OPEN_READWRITE,&dummy); /* STDAUX */ - DOS_OpenFile("CON",OPEN_READWRITE,&dummy); /* STDPRN */ + DOS_OpenFile("PRN",OPEN_READWRITE,&dummy); /* STDPRN */ psp.SetParent(psp_seg); /* Set the environment */