From 35ffcac35b89447a3b78f353e5b916c4dc2c0c70 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 15 Apr 2016 16:49:59 +0200 Subject: Fix for bug about deleting dynamic array of structs. --- libsolidity/codegen/ArrayUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity/codegen') 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; -- cgit v1.2.3