Fix wrong assert in overflow check

This commit is contained in:
Mathias Baumann
2019-10-23 14:59:34 +02:00
parent e56d1aa5aa
commit c3e8023ad5
3 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -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);
}