mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add LLL error when assembly instruction causes stack underflow
This commit is contained in:
parent
a4d2e17a04
commit
e82917d4e6
@ -236,7 +236,12 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
|
|||||||
int c = 0;
|
int c = 0;
|
||||||
for (auto const& i: _t)
|
for (auto const& i: _t)
|
||||||
if (c++)
|
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")
|
else if (us == "INCLUDE")
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user