Skip to content

Commit a114b4f

Browse files
committed
avoid impossible macro lookups in preprocessToken()
1 parent 37fa4f4 commit a114b4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

simplecpp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3191,7 +3191,7 @@ simplecpp::FileDataCache simplecpp::load(const simplecpp::TokenList &rawtokens,
31913191
static bool preprocessToken(simplecpp::TokenList &output, const simplecpp::Token **tok1, simplecpp::MacroMap &macros, std::vector<std::string> &files, simplecpp::OutputList *outputList)
31923192
{
31933193
const simplecpp::Token * const tok = *tok1;
3194-
const simplecpp::MacroMap::const_iterator it = macros.find(tok->str());
3194+
const simplecpp::MacroMap::const_iterator it = tok->name ? macros.find(tok->str()) : macros.end();
31953195
if (it != macros.end()) {
31963196
simplecpp::TokenList value(files);
31973197
try {

0 commit comments

Comments
 (0)