diff --git a/libgnucash/engine/gnc-int128.cpp b/libgnucash/engine/gnc-int128.cpp index 3da9a9fade..d4c25bea17 100644 --- a/libgnucash/engine/gnc-int128.cpp +++ b/libgnucash/engine/gnc-int128.cpp @@ -374,6 +374,8 @@ GncInt128& GncInt128::operator<<= (unsigned int i) noexcept { auto flags = get_flags(m_hi); + if (i == 0) + return *this; if (i > maxbits) { flags &= 0xfe;