mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix carrying to the wrong end of the lower leg in left shift.
This commit is contained in:
parent
e55b78614c
commit
de1c56b53d
@ -384,7 +384,7 @@ GncInt128::operator<<= (unsigned int i) noexcept
|
||||
auto hi = get_num(m_hi);
|
||||
if (i < legbits)
|
||||
{
|
||||
uint64_t carry {(m_lo & (((UINT64_C(1) << i) - 1) << (legbits - i)))};
|
||||
uint64_t carry {(m_lo & (((UINT64_C(1) << i) - 1) << (legbits - i))) >> (legbits - i)};
|
||||
m_lo <<= i;
|
||||
hi <<= i;
|
||||
hi += carry;
|
||||
|
Loading…
Reference in New Issue
Block a user