preprocessor: Fixed a null pointer dereference
This commit is contained in:
parent
666fc82011
commit
a39eaec1cc
|
@ -576,6 +576,8 @@ std::string Preprocessor::expandMacros(std::string code)
|
|||
const Token *tok = tokenizer.tokens();
|
||||
while (tok && tok->str() != ")")
|
||||
tok = tok->next();
|
||||
if (tok)
|
||||
{
|
||||
while ((tok = tok->next()) != NULL)
|
||||
{
|
||||
std::string str = tok->str();
|
||||
|
@ -595,6 +597,7 @@ std::string Preprocessor::expandMacros(std::string code)
|
|||
macrocode += " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Insert macro code..
|
||||
if (!macroparams.empty())
|
||||
|
|
Loading…
Reference in New Issue