Fixed #2372 (internal error in logicaloperator check (varid=0))

This commit is contained in:
Daniel Marjamäki 2010-12-29 10:07:28 +01:00
parent 137d0e2ba7
commit fd27be2440
1 changed files with 2 additions and 0 deletions

View File

@ -253,6 +253,8 @@ void CheckOther::checkIncorrectLogicOperator()
if (Token::Match(term1Tok, "%var% != %num%"))
{
const unsigned int varId = term1Tok->varId();
if (!varId)
continue;
firstConstant = term1Tok->tokAt(2)->str();
if (Token::Match(term2Tok, "%varid% != %num%", varId))