aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-11-03 19:14:06 +0800
committerChristian <c@ethdev.com>2014-11-03 22:44:22 +0800
commit643c781a6ddd4cd601b0aee5ad4d2ee0613495a0 (patch)
treeb2df1c8d74c8c79ee026146123a847d86e430219 /ExpressionCompiler.cpp
parent25c0e08bdfd955d8fdc0e7563c718b6fbba6cd1c (diff)
downloaddexon-solidity-643c781a6ddd4cd601b0aee5ad4d2ee0613495a0.tar.gz
dexon-solidity-643c781a6ddd4cd601b0aee5ad4d2ee0613495a0.tar.zst
dexon-solidity-643c781a6ddd4cd601b0aee5ad4d2ee0613495a0.zip
Bugfix: Swap before mod and div.
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r--ExpressionCompiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index 003d561a..871b6418 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -336,10 +336,10 @@ void ExpressionCompiler::appendArithmeticOperatorCode(Token::Value _operator, Ty
m_context << eth::Instruction::MUL;
break;
case Token::DIV:
- m_context << (isSigned ? eth::Instruction::SDIV : eth::Instruction::DIV);
+ m_context << eth::Instruction::SWAP1 << (isSigned ? eth::Instruction::SDIV : eth::Instruction::DIV);
break;
case Token::MOD:
- m_context << (isSigned ? eth::Instruction::SMOD : eth::Instruction::MOD);
+ m_context << eth::Instruction::SWAP1 << (isSigned ? eth::Instruction::SMOD : eth::Instruction::MOD);
break;
default:
assert(false);