1
0
Fork 0

Make valgrind happy and set a few strings to zero.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2666
This commit is contained in:
Peter Veenstra 2006-06-30 20:04:21 +00:00
parent 43d7055361
commit 49eea1af58
3 changed files with 10 additions and 10 deletions

View file

@ -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 <stdlib.h>
#include <stdarg.h>
@ -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());

View file

@ -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 <stdlib.h>
#include <string.h>
@ -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;