Fix CheckBufferOverrun::array_index_12 when compiling with VS
This commit is contained in:
parent
ebef16b8a3
commit
d0c1632b51
|
@ -1301,10 +1301,10 @@ void SymbolDatabase::setArrayDimensionsUsingValueFlow()
|
|||
};
|
||||
|
||||
if (bits > 0 && bits < 64) {
|
||||
if (dimension.tok->valueType()->sign == ValueType::Sign::SIGNED)
|
||||
dimension.num = 1LL << (bits - 1);
|
||||
else
|
||||
if (dimension.tok->valueType()->sign == ValueType::Sign::UNSIGNED)
|
||||
dimension.num = 1LL << bits;
|
||||
else
|
||||
dimension.num = 1LL << (bits - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue