mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Throw if contract creation fails.
This commit is contained in:
1 parent
e3e4d84f33
commit
2a560b798b
3 files changed
+67
No files matched your search
@@ -533,6 +533,9 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
||||
else
|
||||
m_context << u256(0);
|
||||
m_context << Instruction::CREATE;
|
||||
// Check if zero (out of stack or not enough balance).
|
||||
m_context << Instruction::DUP1 << Instruction::ISZERO;
|
||||
m_context.appendConditionalJumpTo(m_context.errorTag());
|
||||
if (function.valueSet())
|
||||
m_context << swapInstruction(1) << Instruction::POP;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user