Fix issue detected by Coverity, missing check if _settings is null

This commit is contained in:
Daniel Marjamäki 2017-08-02 08:04:35 +02:00
parent 60f819dbe7
commit 462ae455c8
1 changed files with 1 additions and 0 deletions

View File

@ -251,6 +251,7 @@ void TokenList::createTokens(const simplecpp::TokenList *tokenList)
// TODO: It would be better if TokenList didn't simplify hexadecimal numbers
std::string suffix;
if (isHex &&
_settings &&
str.size() == (2 + _settings->int_bit / 4) &&
(str[2] >= '8') && // includes A-F and a-f
MathLib::getSuffix(str).empty()