From c18094c9196f89e3db99dabae89d955c328c0d5d Mon Sep 17 00:00:00 2001 From: Ulf Wohlers Date: Mon, 4 Nov 2002 13:31:59 +0000 Subject: [PATCH] Fixed bug in RealHandle. it lost the highbyte of the file handle, which may lead to wrong file access. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@474 --- include/dos_inc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/dos_inc.h b/include/dos_inc.h index 48bc6aba..fbc98df4 100644 --- a/include/dos_inc.h +++ b/include/dos_inc.h @@ -418,6 +418,9 @@ private: extern DOS_InfoBlock dos_infoblock;; INLINE Bit8u RealHandle(Bit16u handle) { + + // test out of range + if (handle>0xFF) return 0xff; DOS_PSP psp(dos.psp); return psp.GetFileHandle((Bit8u)handle); }