mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix wrong assert in overflow check
This commit is contained in:
@@ -1849,7 +1849,7 @@ u256 ArrayType::memoryDataSize() const
|
||||
solAssert(m_location == DataLocation::Memory, "");
|
||||
solAssert(!isByteArray(), "");
|
||||
bigint size = bigint(m_length) * m_baseType->memoryHeadSize();
|
||||
solAssert(size <= numeric_limits<unsigned>::max(), "Array size does not fit u256.");
|
||||
solAssert(size <= numeric_limits<u256>::max(), "Array size does not fit u256.");
|
||||
return u256(size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user