From c320a650f940fe96108c4c4687313ef26a33e248 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 19 Sep 2018 13:13:42 +0100 Subject: LLL: terminate sequences with a STOP --- liblll/CodeFragment.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'liblll') diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index 85480119..60dd0917 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -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; -- cgit