aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsolidity/Types.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/Types.cpp b/libsolidity/Types.cpp
index 0e24a813..435385e6 100644
--- a/libsolidity/Types.cpp
+++ b/libsolidity/Types.cpp
@@ -859,9 +859,9 @@ u256 ArrayType::memorySize() const
{
solAssert(!isDynamicallySized(), "");
solAssert(m_location == DataLocation::Memory, "");
- u256 size = m_length * m_baseType->memoryHeadSize();
- solAssert(size <= numeric_limits<unsigned>::max(), "Array size does not fit unsigned.");
- return size;
+ bigint size = bigint(m_length) * m_baseType->memoryHeadSize();
+ solAssert(size <= numeric_limits<unsigned>::max(), "Array size does not fit u256.");
+ return u256(size);
}
TypePointer ArrayType::copyForLocation(DataLocation _location, bool _isPointer) const