From 9d11d0ff68c559ff7b2f0b07c6c8a2ad1717233c Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 4 May 2017 18:09:20 +0100 Subject: [PATCH] Workaround bug in Boost --- libevm/VM.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libevm/VM.cpp b/libevm/VM.cpp index 1ca1d7612ab..d98dc05f758 100755 --- a/libevm/VM.cpp +++ b/libevm/VM.cpp @@ -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