diff options
-rw-r--r-- | liblll/CodeFragment.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index 60dd0917..f37cb8b9 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -236,7 +236,12 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) int c = 0; for (auto const& i: _t) if (c++) - m_asm.append(CodeFragment(i, _s, m_readFile, true).m_asm); + { + auto fragment = CodeFragment(i, _s, m_readFile, true).m_asm; + if ((m_asm.deposit() + fragment.deposit()) < 0) + error<IncorrectParameterCount>("The assembly instruction resulted in stack underflow"); + m_asm.append(fragment); + } } else if (us == "INCLUDE") { |