LLL: terminate sequences with a STOP

This commit is contained in:
Alex Beregszaszi 2018-09-19 13:13:42 +01:00 committed by chriseth
parent 82fadfd1a7
commit c320a650f9

View File

@ -45,6 +45,10 @@ using namespace dev::lll;
void CodeFragment::finalise(CompilerState const& _cs)
{
// NOTE: add this as a safeguard in case the user didn't issue an
// explicit stop at the end of the sequence
m_asm.append(Instruction::STOP);
if (_cs.usedAlloc && _cs.vars.size() && !m_finalised)
{
m_finalised = true;