Merge pull request #575 from Dmitry-Me/avoidIntegerTruncation
Avoid value truncation
This commit is contained in:
commit
9846ff10b2
|
@ -1736,7 +1736,7 @@ Check::FileInfo* CheckBufferOverrun::getFileInfo(const Tokenizer *tokenizer, con
|
|||
tok->next()->astOperand2()) {
|
||||
const ValueFlow::Value *value = tok->next()->astOperand2()->getMaxValue(false);
|
||||
if (value && value->intvalue > 0) {
|
||||
const int arrayIndex = value->intvalue;
|
||||
const MathLib::bigint arrayIndex = value->intvalue;
|
||||
std::map<std::string, struct MyFileInfo::ArrayUsage>::iterator it = fileInfo->arrayUsage.find(tok->str());
|
||||
if (it != fileInfo->arrayUsage.end() && it->second.index >= arrayIndex)
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue