LLL: terminate sequences with a STOP

This commit is contained in:
Alex Beregszaszi
2018-11-13 13:47:29 +01:00
committed by chriseth
parent 82fadfd1a7
commit c320a650f9
+4
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;