Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Workaround bug in Boost
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed May 4, 2017
1 parent f375b50 commit 9d11d0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libevm/VM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,9 @@ void VM::interpretCases()
ON_OP();
updateIOGas();

/// TODO: confirm shift >= 256 results in 0
m_SPP[0] = m_SP[0] << m_SP[1];
/// This workarounds a bug in Boost, ...
u256 mask = u256(1) << (256 - m_SP[1])) - 1;
m_SPP[0] = (m_SP[0] & mask) << m_SP[1];
}
NEXT

Expand Down

0 comments on commit 9d11d0f

Please sign in to comment.