From 55f41cb6781a5da87aac21b93ab6ce0efb66b32b Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sat, 2 Oct 2004 11:13:02 +0000 Subject: [PATCH] Made the : optional in subst. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2009 --- src/shell/shell_cmds.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index 62217170..d4cdec41 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_cmds.cpp,v 1.47 2004-09-18 10:20:54 qbix79 Exp $ */ +/* $Id: shell_cmds.cpp,v 1.48 2004-10-02 11:13:02 qbix79 Exp $ */ #include #include @@ -619,7 +619,7 @@ void DOS_Shell::CMD_SUBST (char * args) { if((arg=="/D" ) || (arg=="/d")) throw 1; //No removal (one day) command.FindCommand(1,arg); - if(arg[1] !=':') throw(0); + if( (arg.size()>1) && arg[1] !=':') throw(0); temp_str[0]=toupper(args[0]); if(Drives[temp_str[0]-'A'] ) throw 0; //targetdrive in use strcat(mountstring,temp_str);