Fix CodeQL warning, Multiplication result converted to larger type

This commit is contained in:
Daniel Marjamäki 2020-11-06 19:44:15 +01:00
parent 38a24703c9
commit 52b88bcee3
1 changed files with 1 additions and 1 deletions

View File

@ -1321,7 +1321,7 @@ static void setValues(Tokenizer *tokenizer, SymbolDatabase *symbolDatabase)
int sz = vt.typeSize(*settings, true);
if (sz <= 0)
continue;
int mul = 1;
long long mul = 1;
for (Token *arrtok = tok->linkAt(1)->previous(); arrtok; arrtok = arrtok->previous()) {
const std::string &a = arrtok->str();
if (a.size() > 2 && a[0] == '[' && a.back() == ']')