aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ArrayUtils.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-04-15 22:49:59 +0800
committerchriseth <c@ethdev.com>2016-04-15 22:49:59 +0800
commit35ffcac35b89447a3b78f353e5b916c4dc2c0c70 (patch)
treea52406afe6cadcd533359be57300c082d3fac131 /libsolidity/codegen/ArrayUtils.cpp
parent82175fbd2bc70495c031f78f6af1e974565174a5 (diff)
downloaddexon-solidity-35ffcac35b89447a3b78f353e5b916c4dc2c0c70.tar.gz
dexon-solidity-35ffcac35b89447a3b78f353e5b916c4dc2c0c70.tar.zst
dexon-solidity-35ffcac35b89447a3b78f353e5b916c4dc2c0c70.zip
Fix for bug about deleting dynamic array of structs.
Diffstat (limited to 'libsolidity/codegen/ArrayUtils.cpp')
-rw-r--r--libsolidity/codegen/ArrayUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/codegen/ArrayUtils.cpp b/libsolidity/codegen/ArrayUtils.cpp
index 8e568be5..e7e8a98e 100644
--- a/libsolidity/codegen/ArrayUtils.cpp
+++ b/libsolidity/codegen/ArrayUtils.cpp
@@ -759,7 +759,7 @@ void ArrayUtils::clearStorageLoop(Type const& _type) const
StorageItem(m_context, _type).setToZero(SourceLocation(), false);
m_context << Instruction::POP;
// increment
- m_context << u256(1) << Instruction::ADD;
+ m_context << _type.storageSize() << Instruction::ADD;
m_context.appendJumpTo(loopStart);
// cleanup
m_context << zeroLoopEnd;