Fix for bug about deleting dynamic array of structs.

This commit is contained in:
chriseth 2016-04-15 16:49:59 +02:00
parent 82175fbd2b
commit 35ffcac35b

View File

@ -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;