diff --git a/src/dos/dos_files.cpp b/src/dos/dos_files.cpp index 9d6d350a..8c3e6082 100644 --- a/src/dos/dos_files.cpp +++ b/src/dos/dos_files.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos_files.cpp,v 1.75 2006-06-22 13:15:07 qbix79 Exp $ */ +/* $Id: dos_files.cpp,v 1.76 2006-06-30 20:04:21 qbix79 Exp $ */ #include #include @@ -655,10 +655,10 @@ static bool isvalid(const char in){ Bit8u FCB_Parsename(Bit16u seg,Bit16u offset,Bit8u parser ,char *string, Bit8u *change) { char * string_begin=string;Bit8u ret=0; - DOS_FCB fcb(seg,offset); - bool hasdrive,hasname,hasext; - hasdrive=hasname=hasext=false; - Bitu index;bool finished;Bit8u fill; + DOS_FCB fcb(seg,offset); + bool hasdrive,hasname,hasext,finished; + hasdrive=hasname=hasext=finished=false; + Bitu index=0;Bit8u fill=' '; /* First get the old data from the fcb */ #ifdef _MSC_VER #pragma pack (1) diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 3d4f1f6f..cdba628f 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell.cpp,v 1.74 2006-05-25 15:08:40 qbix79 Exp $ */ +/* $Id: shell.cpp,v 1.75 2006-06-30 20:04:21 qbix79 Exp $ */ #include #include @@ -263,7 +263,7 @@ void DOS_Shell::ParseLine(char * line) { void DOS_Shell::RunInternal(void) { - char input_line[CMD_MAXLINE]; + char input_line[CMD_MAXLINE] = {0}; std::string line; while(bf && bf->ReadLine(input_line)) { @@ -281,7 +281,7 @@ void DOS_Shell::RunInternal(void) void DOS_Shell::Run(void) { - char input_line[CMD_MAXLINE]; + char input_line[CMD_MAXLINE] = {0}; std::string line; if (cmd->FindStringRemain("/C",line)) { strcpy(input_line,line.c_str()); diff --git a/src/shell/shell_batch.cpp b/src/shell/shell_batch.cpp index b151a7ab..e9ac29f2 100644 --- a/src/shell/shell_batch.cpp +++ b/src/shell/shell_batch.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_batch.cpp,v 1.21 2006-05-25 15:08:40 qbix79 Exp $ */ +/* $Id: shell_batch.cpp,v 1.22 2006-06-30 20:04:21 qbix79 Exp $ */ #include #include @@ -43,7 +43,7 @@ BatchFile::~BatchFile() { } bool BatchFile::ReadLine(char * line) { - Bit8u c;Bit16u n; + Bit8u c=0;Bit16u n=1; char temp[CMD_MAXLINE]; emptyline: char * cmd_write=temp;