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
c45495afb9
commit
e9eef77489
@ -336,9 +336,11 @@ void ExpressionCompiler::appendArithmeticOperatorCode(Token::Value _operator, Ty
|
|||||||
append(eth::Instruction::MUL);
|
append(eth::Instruction::MUL);
|
||||||
break;
|
break;
|
||||||
case Token::DIV:
|
case Token::DIV:
|
||||||
|
append(eth::Instruction::SWAP1);
|
||||||
append(isSigned ? eth::Instruction::SDIV : eth::Instruction::DIV);
|
append(isSigned ? eth::Instruction::SDIV : eth::Instruction::DIV);
|
||||||
break;
|
break;
|
||||||
case Token::MOD:
|
case Token::MOD:
|
||||||
|
append(eth::Instruction::SWAP1);
|
||||||
append(isSigned ? eth::Instruction::SMOD : eth::Instruction::MOD);
|
append(isSigned ? eth::Instruction::SMOD : eth::Instruction::MOD);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user