From c80281976f40a3ca7ac0a0c5924d59a0c14aacbc Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sun, 25 Aug 2002 16:36:51 +0000 Subject: [PATCH] Test for too high drive setting and included for toupper Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@216 --- src/dos/dos_files.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dos/dos_files.cpp b/src/dos/dos_files.cpp index f1484048..4ee82a0c 100644 --- a/src/dos/dos_files.cpp +++ b/src/dos/dos_files.cpp @@ -19,6 +19,8 @@ #include #include #include +#include + #include "dosbox.h" #include "mem.h" #include "cpu.h" @@ -39,7 +41,7 @@ Bit8u DOS_GetDefaultDrive(void) { } void DOS_SetDefaultDrive(Bit8u drive) { - CurrentDrive=drive; + if (drive<=DOS_DRIVES) CurrentDrive=drive; } bool DOS_MakeName(char * name,char * fullname,Bit8u * drive) {