diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2023-05-18 15:51:46 +0200 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-05-18 22:23:15 +0200 |
commit | c9f6605fb222a131e452fd65acb5df58bc38bef5 (patch) | |
tree | 74a29cee99b267906cb33943c2342c1f6eb2b8c6 /AK | |
parent | 70c977aa56844e8712604454ce815ae04c7bc4eb (diff) | |
download | serenity-c9f6605fb222a131e452fd65acb5df58bc38bef5.zip |
AK: Account for bit position 8 in bit stream alignment
See identical code in LittleEndianBitStream; even in the bytewise
reading BigEndianBitStream an offset of 8 is not inconsistent state and
handled just fine by read_bits.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/BitStream.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/BitStream.h b/AK/BitStream.h index f16dfc7d37..97da95b9fa 100644 --- a/AK/BitStream.h +++ b/AK/BitStream.h @@ -109,7 +109,7 @@ public: } /// Whether we are (accidentally or intentionally) at a byte boundary right now. - ALWAYS_INLINE bool is_aligned_to_byte_boundary() const { return m_bit_offset == 0; } + ALWAYS_INLINE bool is_aligned_to_byte_boundary() const { return m_bit_offset % 8 == 0; } private: Optional<u8> m_current_byte; |