Fixed #2457 (CheckOther::checkIncorrectLogicOperator: hang if variable id is 0)
This commit is contained in:
parent
9c300813a4
commit
481907ef14
|
@ -254,7 +254,11 @@ void CheckOther::checkIncorrectLogicOperator()
|
||||||
{
|
{
|
||||||
const unsigned int varId = term1Tok->varId();
|
const unsigned int varId = term1Tok->varId();
|
||||||
if (!varId)
|
if (!varId)
|
||||||
|
{
|
||||||
|
tok = Token::findmatch(endTok->next(), conditionPattern);
|
||||||
|
endTok = tok ? tok->next()->link() : NULL;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
firstConstant = term1Tok->tokAt(2)->str();
|
firstConstant = term1Tok->tokAt(2)->str();
|
||||||
|
|
||||||
if (Token::Match(term2Tok, "%varid% != %num%", varId))
|
if (Token::Match(term2Tok, "%varid% != %num%", varId))
|
||||||
|
|
Loading…
Reference in New Issue