mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
- corrected delete in case we have more than one locals
- added a test
This commit is contained in:
parent
a0ec9c6680
commit
c3d36d1fe1
@ -810,9 +810,9 @@ void ExpressionCompiler::LValue::setToZero(Expression const& _expression) const
|
|||||||
if (stackDiff > 16)
|
if (stackDiff > 16)
|
||||||
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_sourceLocation(_expression.getLocation())
|
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_sourceLocation(_expression.getLocation())
|
||||||
<< errinfo_comment("Stack too deep."));
|
<< errinfo_comment("Stack too deep."));
|
||||||
solAssert(stackDiff <= m_size, "");
|
solAssert(stackDiff >= m_size - 1, "");
|
||||||
for (unsigned i = 0; i < m_size; ++i)
|
for (unsigned i = 0; i < m_size; ++i)
|
||||||
*m_context << u256(0) << eth::swapInstruction(stackDiff + (m_size - i) )
|
*m_context << u256(0) << eth::swapInstruction(stackDiff + 1 - i)
|
||||||
<< eth::Instruction::POP;
|
<< eth::Instruction::POP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user