Skip to content

Commit

Permalink
Discard nameless macros used as placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
mungre committed Sep 9, 2024
1 parent 5d5d940 commit 548ddc1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/sourcecode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 548ddc1

Please sign in to comment.