Fixed #2980
This commit is contained in:
parent
1e708e10d0
commit
30e8e389a7
|
@ -192,6 +192,8 @@ unsigned int TemplateSimplifier::templateParameters(const Token *tok)
|
|||
if (!tok->isNumber() && !tok->isName())
|
||||
return 0;
|
||||
tok = tok->next();
|
||||
if (!tok)
|
||||
return 0;
|
||||
|
||||
// optional "*"
|
||||
if (tok->str() == "*")
|
||||
|
|
|
@ -3103,7 +3103,7 @@ private:
|
|||
|
||||
void varid36() { // ticket #2980 (segmentation fault)
|
||||
const std::string code("#elif A\n"
|
||||
"A,a<b<x0;\n");
|
||||
"A,a<b<x0\n");
|
||||
tokenizeDebugListing(code);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue