mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #664 from chriseth/sol_fix_compoundAssign
Bugfix: Additional swap for compound assignment.
This commit is contained in:
commit
8e3fbbad44
@ -62,6 +62,8 @@ bool ExpressionCompiler::visit(Assignment const& _assignment)
|
||||
m_context << eth::Instruction::SWAP1 << eth::Instruction::DUP2;
|
||||
m_currentLValue.retrieveValue(_assignment, true);
|
||||
appendOrdinaryBinaryOperatorCode(Token::AssignmentToBinaryOp(op), *_assignment.getType());
|
||||
if (m_currentLValue.storesReferenceOnStack())
|
||||
m_context << eth::Instruction::SWAP1;
|
||||
}
|
||||
m_currentLValue.storeValue(_assignment);
|
||||
m_currentLValue.reset();
|
||||
|
Loading…
Reference in New Issue
Block a user