mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Bugfix: Swap before mod and div.
This commit is contained in:
parent
25c0e08bdf
commit
643c781a6d
@ -336,10 +336,10 @@ void ExpressionCompiler::appendArithmeticOperatorCode(Token::Value _operator, Ty
|
|||||||
m_context << eth::Instruction::MUL;
|
m_context << eth::Instruction::MUL;
|
||||||
break;
|
break;
|
||||||
case Token::DIV:
|
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;
|
break;
|
||||||
case Token::MOD:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user