mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-01-19 04:22:11 +00:00
Correct assert.
This commit is contained in:
@@ -398,6 +398,8 @@ inline BOOST_MP_CXX14_CONSTEXPR void left_shift_generic(Int& result, double_limb
|
||||
{
|
||||
const limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
|
||||
const limb_type shift = static_cast<limb_type>(s % Int::limb_bits);
|
||||
|
||||
typename Int::limb_pointer pr = result.limbs();
|
||||
BOOST_ASSERT(shift < sizeof(pr[0]) * CHAR_BIT);
|
||||
|
||||
std::size_t ors = result.size();
|
||||
@@ -410,8 +412,6 @@ inline BOOST_MP_CXX14_CONSTEXPR void left_shift_generic(Int& result, double_limb
|
||||
result.resize(rs, rs);
|
||||
bool truncated = result.size() != rs;
|
||||
|
||||
typename Int::limb_pointer pr = result.limbs();
|
||||
|
||||
if (offset > rs)
|
||||
{
|
||||
// The result is shifted past the end of the result:
|
||||
|
||||
Reference in New Issue
Block a user