Skip to content

Commit 69be83e

Browse files
committed
avoid impossible macro lookups in preprocessToken() [skip ci]
1 parent b7c384c commit 69be83e

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
@@ -3196,7 +3196,7 @@ simplecpp::FileDataCache simplecpp::load(const simplecpp::TokenList &rawtokens,
31963196
static bool preprocessToken(simplecpp::TokenList &output, const simplecpp::Token **tok1, simplecpp::MacroMap &macros, std::vector<std::string> &files, simplecpp::OutputList *outputList)
31973197
{
31983198
const simplecpp::Token * const tok = *tok1;
3199-
const simplecpp::MacroMap::const_iterator it = macros.find(tok->str());
3199+
const simplecpp::MacroMap::const_iterator it = tok->name ? macros.find(tok->str()) : macros.end();
32003200
if (it != macros.end()) {
32013201
simplecpp::TokenList value(files);
32023202
try {

0 commit comments

Comments
 (0)