Fix issue detected by Coverity, missing check if _settings is null
This commit is contained in:
parent
60f819dbe7
commit
462ae455c8
|
@ -251,6 +251,7 @@ void TokenList::createTokens(const simplecpp::TokenList *tokenList)
|
||||||
// TODO: It would be better if TokenList didn't simplify hexadecimal numbers
|
// TODO: It would be better if TokenList didn't simplify hexadecimal numbers
|
||||||
std::string suffix;
|
std::string suffix;
|
||||||
if (isHex &&
|
if (isHex &&
|
||||||
|
_settings &&
|
||||||
str.size() == (2 + _settings->int_bit / 4) &&
|
str.size() == (2 + _settings->int_bit / 4) &&
|
||||||
(str[2] >= '8') && // includes A-F and a-f
|
(str[2] >= '8') && // includes A-F and a-f
|
||||||
MathLib::getSuffix(str).empty()
|
MathLib::getSuffix(str).empty()
|
||||||
|
|
Loading…
Reference in New Issue