From 51dda5a3f6c62bce21c8e3239087ef436b19cd81 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 8 Nov 2006 20:20:09 +0000 Subject: [PATCH] Make valgrind happy. (and maybe us as well) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2719 --- src/shell/shell_misc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shell/shell_misc.cpp b/src/shell/shell_misc.cpp index 0fed3ec0..1241cbbd 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.45 2006-09-09 16:06:32 qbix79 Exp $ */ +/* $Id: shell_misc.cpp,v 1.46 2006-11-08 20:20:09 qbix79 Exp $ */ #include #include @@ -441,6 +441,8 @@ bool DOS_Shell::Execute(char * name,char * args) { MEM_BlockWrite(Real2Phys(file_name),fullname,strlen(fullname)+1); /* Fill the command line */ CommandTail cmdtail; + cmdtail.count = 0; + memset(&cmdtail.buffer,0,126); //Else some part of the string is unitialized (valgrind) if (strlen(line)>126) line[126]=0; cmdtail.count=strlen(line); memcpy(cmdtail.buffer,line,strlen(line));