From 60f6a77081aaeef5932e4bad9fb31a3d50f5a014 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 26 Mar 2003 20:06:59 +0000 Subject: [PATCH] made mount more flexible Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@801 --- src/dos/dos_programs.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/dos/dos_programs.cpp b/src/dos/dos_programs.cpp index a3a5f366..be6cbe90 100644 --- a/src/dos/dos_programs.cpp +++ b/src/dos/dos_programs.cpp @@ -47,14 +47,8 @@ public: } return; } - std::string type="dir"; - - // get the drive letter - cmd->FindCommand(1,temp_line); - if (temp_line.size()>1) goto showusage; - drive=toupper(temp_line[0]); - if (!isalpha(drive)) goto showusage; + std::string type="dir"; cmd->FindString("-t",type,true); if (type=="floppy" || type=="dir" || type=="cdrom") { Bit16u sizes[4]; @@ -84,7 +78,12 @@ public: scan++; } number[index]=0;sizes[count++]=atoi(number); - + + // get the drive letter + cmd->FindCommand(1,temp_line); + if ((temp_line.size() > 2) || ((temp_line.size()>1) && (temp_line[1]!=':'))) goto showusage; + drive=toupper(temp_line[0]); + if (!isalpha(drive)) goto showusage; if (!cmd->FindCommand(2,temp_line)) goto showusage; if (!temp_line.size()) goto showusage;