Fixed #1325 (Segmentation fault in simplifyTypedef due to bad preprocessing)
This commit is contained in:
parent
fc54ed1eef
commit
19bb2940cc
|
@ -1626,7 +1626,8 @@ public:
|
|||
}
|
||||
optcomma = false;
|
||||
macrocode += str;
|
||||
if (Token::Match(tok, "%var% %var%"))
|
||||
if (Token::Match(tok, "%var% %var%") ||
|
||||
Token::Match(tok, "> >"))
|
||||
macrocode += " ";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -501,6 +501,12 @@ void Tokenizer::simplifyTypedef()
|
|||
while (end && end->next() && Token::Match(end->next(), ":: %type%"))
|
||||
end = end->tokAt(2);
|
||||
|
||||
if (!end)
|
||||
{
|
||||
// internal error
|
||||
return;
|
||||
}
|
||||
|
||||
tok = end;
|
||||
}
|
||||
else if (Token::Match(tok->next(), "%type%"))
|
||||
|
|
Loading…
Reference in New Issue