Fix crash in daca@home

This commit is contained in:
Daniel Marjamäki 2021-09-12 19:41:35 +02:00
parent b455f847ba
commit 23d37e5e7b
1 changed files with 1 additions and 1 deletions

View File

@ -1812,7 +1812,7 @@ void CheckCondition::checkCompareValueOutOfTypeRange()
long long typeMaxValue; long long typeMaxValue;
if (typeTok->valueType()->sign != ValueType::Sign::SIGNED) if (typeTok->valueType()->sign != ValueType::Sign::SIGNED)
typeMaxValue = unsignedTypeMaxValue; typeMaxValue = unsignedTypeMaxValue;
else if (bits >= mSettings->int_bit && valueTok->valueType()->sign != ValueType::Sign::SIGNED) else if (bits >= mSettings->int_bit && (!valueTok->valueType() || valueTok->valueType()->sign != ValueType::Sign::SIGNED))
typeMaxValue = unsignedTypeMaxValue; typeMaxValue = unsignedTypeMaxValue;
else else
typeMaxValue = unsignedTypeMaxValue / 2; typeMaxValue = unsignedTypeMaxValue / 2;