Avoid value truncation
This commit is contained in:
parent
be4e51f00b
commit
9398fa810b
|
@ -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