This commit is contained in:
PKEuS 2012-04-26 10:58:35 +02:00
parent 1e708e10d0
commit 30e8e389a7
2 changed files with 3 additions and 1 deletions

View File

@ -192,6 +192,8 @@ unsigned int TemplateSimplifier::templateParameters(const Token *tok)
if (!tok->isNumber() && !tok->isName()) if (!tok->isNumber() && !tok->isName())
return 0; return 0;
tok = tok->next(); tok = tok->next();
if (!tok)
return 0;
// optional "*" // optional "*"
if (tok->str() == "*") if (tok->str() == "*")

View File

@ -3103,7 +3103,7 @@ private:
void varid36() { // ticket #2980 (segmentation fault) void varid36() { // ticket #2980 (segmentation fault)
const std::string code("#elif A\n" const std::string code("#elif A\n"
"A,a<b<x0;\n"); "A,a<b<x0\n");
tokenizeDebugListing(code); tokenizeDebugListing(code);
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
} }