Bugfix: Swap before mod and div.

This commit is contained in:
Christian 2014-11-03 12:14:06 +01:00
parent 25c0e08bdf
commit 643c781a6d

View File

@ -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);