aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index 6dd9d005..5e9c6920 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -180,13 +180,12 @@ bool ExpressionCompiler::visit(Conditional const& _condition)
{
CompilerContext::LocationSetter locationSetter(m_context, _condition);
_condition.condition().accept(*this);
- m_context << eth::Instruction::ISZERO;
- eth::AssemblyItem falseTag = m_context.appendConditionalJump();
- _condition.trueExpression().accept(*this);
+ eth::AssemblyItem trueTag = m_context.appendConditionalJump();
+ _condition.falseExpression().accept(*this);
eth::AssemblyItem endTag = m_context.appendJumpToNew();
- m_context << falseTag;
+ m_context << trueTag;
m_context.adjustStackOffset(-1);
- _condition.falseExpression().accept(*this);
+ _condition.trueExpression().accept(*this);
m_context << endTag;
return false;
}