fixed CALL case. added exception

This commit is contained in:
Liana Husikyan 2015-06-01 16:39:09 +02:00
parent 9af94ca0dc
commit af4650beb2

View File

@ -1105,8 +1105,8 @@ void ExpressionCompiler::appendExternalFunctionCall(
m_context << eth::Instruction::CALL;
//Propagate error condition (if CALL pushes 0 on stack).
auto tag = m_context.appendConditionalJump();
m_context << eth::Instruction::STOP << tag; // STOP if CALL leaves 0.
m_context << eth::Instruction::ISZERO;
m_context.appendConditionalJumpTo(m_context.errorTag());
if (_functionType.valueSet())
m_context << eth::Instruction::POP;