From a32fb49df0a63bee951f98e7583396c3adb28ad3 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 9 Jul 2010 18:43:26 +0000 Subject: Solved crash when compiled with VS2010 --- tools/mhmake/src/commandqueue.cpp | 2 +- tools/mhmake/src/commandqueue.h | 18 +++++++++++++----- tools/mhmake/src/mhmakeparser.y | 3 ++- tools/mhmake/src/util.h | 2 +- 4 files changed, 17 insertions(+), 8 deletions(-) (limited to 'tools') diff --git a/tools/mhmake/src/commandqueue.cpp b/tools/mhmake/src/commandqueue.cpp index 5c09da905..306142d2b 100644 --- a/tools/mhmake/src/commandqueue.cpp +++ b/tools/mhmake/src/commandqueue.cpp @@ -140,7 +140,7 @@ void commandqueue::RemoveActiveEntry(unsigned Entry) Entry=EntryP1; } } - m_pActiveEntries[Entry]=activeentry(); + m_pActiveEntries[Entry].clear(); m_pActiveProcesses[Entry]=NULL; m_NrActiveEntries--; } diff --git a/tools/mhmake/src/commandqueue.h b/tools/mhmake/src/commandqueue.h index 84878067e..3642d2f1d 100644 --- a/tools/mhmake/src/commandqueue.h +++ b/tools/mhmake/src/commandqueue.h @@ -33,11 +33,19 @@ class commandqueue { struct activeentry { - refptr pTarget; - vector::iterator CurrentCommandIt; - string Command; - md5_context md5ctx; - bool IgnoreError; + refptr pTarget; + vector::const_iterator CurrentCommandIt; + string Command; + md5_context md5ctx; + bool IgnoreError; + void clear() + { + pTarget=NULL; + Command.clear(); + #ifdef _DEBUG + md5ctx.Data.clear(); + #endif + } }; private: queue< refptr > m_Queue; diff --git a/tools/mhmake/src/mhmakeparser.y b/tools/mhmake/src/mhmakeparser.y index 336ddb6dc..2b2e11411 100644 --- a/tools/mhmake/src/mhmakeparser.y +++ b/tools/mhmake/src/mhmakeparser.y @@ -188,7 +188,8 @@ optvarassignment: STRING OPTEQUAL maybeemptyexpression ; maybeemptyexpression: NEWLINE {$$=g_EmptyString;} | - expression NEWLINE + expression NEWLINE | + expression SPACE NEWLINE ; expression: nonspaceexpression | diff --git a/tools/mhmake/src/util.h b/tools/mhmake/src/util.h index f29b9cbcf..9f8ab5b9b 100644 --- a/tools/mhmake/src/util.h +++ b/tools/mhmake/src/util.h @@ -50,7 +50,7 @@ #define PLATFORM "linux" #endif -#define MHMAKEVER "2.0.5" +#define MHMAKEVER "2.0.6" class makecommand { -- cgit v1.2.3