From 462ae455c8777ae5609f49ef72e8518b839cb03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 2 Aug 2017 08:04:35 +0200 Subject: [PATCH] Fix issue detected by Coverity, missing check if _settings is null --- lib/tokenlist.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 29ebe0a1d..6446edfb0 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -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()