src/checkbufferoverrun.cpp: don't call Token::Match() for variables with varId 0.

This commit is contained in:
Slava Semushin 2009-08-02 20:01:59 +07:00
parent 822fb93cda
commit 13532cbff7
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ void CheckBufferOverrun::checkScope(const Token *tok, const char *varname[], con
break;
}
else if (counter_varid > 0 && !min_counter_value.empty() && !max_counter_value.empty())
else if (varid > 0 && counter_varid > 0 && !min_counter_value.empty() && !max_counter_value.empty())
{
int min_index = 0;
int max_index = 0;