From d44511abce302be16ff60290e55a3dafb0e7142a Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 22 Aug 2007 11:21:28 +0000 Subject: [PATCH] Fix small bug when for some reason an invalid drive gets selected. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2981 --- src/shell/shell_misc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shell/shell_misc.cpp b/src/shell/shell_misc.cpp index e0c371eb..4a023f3f 100644 --- a/src/shell/shell_misc.cpp +++ b/src/shell/shell_misc.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_misc.cpp,v 1.50 2007-08-03 18:22:45 qbix79 Exp $ */ +/* $Id: shell_misc.cpp,v 1.51 2007-08-22 11:21:28 qbix79 Exp $ */ #include #include @@ -30,6 +30,7 @@ void DOS_Shell::ShowPrompt(void) { Bit8u drive=DOS_GetDefaultDrive()+'A'; char dir[DOS_PATHLENGTH]; + dir[0] = 0; //DOS_GetCurrentDir doesn't always return something. (if drive is messed up) DOS_GetCurrentDir(0,dir); WriteOut("%c:\\%s>",drive,dir); }