mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix interpreter exp bug.
This commit is contained in:
@@ -42,7 +42,7 @@ u256 exp256(u256 _base, u256 _exponent)
|
||||
u256 result = 1;
|
||||
while (_exponent)
|
||||
{
|
||||
if (static_cast<limb_type>(_exponent) & 1) // If exponent is odd.
|
||||
if (boost::multiprecision::bit_test(_exponent, 0))
|
||||
result *= _base;
|
||||
_base *= _base;
|
||||
_exponent >>= 1;
|
||||
|
||||
Reference in New Issue
Block a user