From 548ddc12d0127dd5806545633a9c88ca041b058e Mon Sep 17 00:00:00 2001 From: Charles Reilly Date: Sat, 31 Aug 2024 20:22:22 +0100 Subject: [PATCH] Discard nameless macros used as placeholders --- src/sourcecode.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/sourcecode.cpp b/src/sourcecode.cpp index 0647c6f..493de30 100644 --- a/src/sourcecode.cpp +++ b/src/sourcecode.cpp @@ -551,7 +551,15 @@ void SourceCode::EndMacro( const string& line, int column ) if ( GlobalData::Instance().IsFirstPass() ) { - MacroTable::Instance().Add( m_currentMacro ); + if ( m_currentMacro->GetName().empty() ) + { + // This is a placeholder used to skip a macro definition in an IF FALSE block + delete m_currentMacro; + } + else + { + MacroTable::Instance().Add( m_currentMacro ); + } m_currentMacro = NULL; } }