CheckOther: Use Variable::valueType() instead of Variable::typeStartToken

This commit is contained in:
Daniel Marjamäki 2018-06-23 16:49:26 +02:00
parent 2a8296879c
commit fc78530b3f
1 changed files with 1 additions and 1 deletions

View File

@ -2361,7 +2361,7 @@ void CheckOther::checkIncompleteArrayFill()
if (MathLib::toLongNumber(tok->linkAt(1)->strAt(-1)) == var->dimension(0)) { if (MathLib::toLongNumber(tok->linkAt(1)->strAt(-1)) == var->dimension(0)) {
unsigned int size = mTokenizer->sizeOfType(var->typeStartToken()); unsigned int size = mTokenizer->sizeOfType(var->typeStartToken());
if (size == 0 && var->typeStartToken()->next()->str() == "*") if (size == 0 && var->valueType()->pointer)
size = mSettings->sizeof_pointer; size = mSettings->sizeof_pointer;
if ((size != 1 && size != 100 && size != 0) || var->isPointer()) { if ((size != 1 && size != 100 && size != 0) || var->isPointer()) {
if (printWarning) if (printWarning)