improved the test

This commit is contained in:
LianaHus
2015-09-23 17:31:47 +02:00
parent 5ba559beaf
commit c096c3c349
2 changed files with 16 additions and 5 deletions
+3 -2
View File
@@ -857,8 +857,9 @@ u256 ArrayType::memorySize() const
{
solAssert(!isDynamicallySized(), "");
solAssert(m_location == DataLocation::Memory, "");
return m_length * m_baseType->memoryHeadSize();
u256 size = m_length * m_baseType->memoryHeadSize();
solAssert(size <= numeric_limits<unsigned>::max(), "Array size does not fit unsigned.");
return size;
}
TypePointer ArrayType::copyForLocation(DataLocation _location, bool _isPointer) const