Skip to content

Commit

Permalink
Исправление CGolombBuffer::IsEOF() - не учитывали "оставшиеся" биты.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksoid1978 committed Nov 10, 2024
1 parent cc422b1 commit 7fba161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DSUtil/GolombBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CGolombBuffer
int GetSize() const { return m_nSize; }
int RemainingSize() const { return m_nSize - m_nBitPos; }
int BitsLeft() const { return 8 * RemainingSize() + m_bitlen; }
bool IsEOF() const { return m_nBitPos >= m_nSize; }
bool IsEOF() const { return !m_bitlen && m_nBitPos >= m_nSize; }
int GetPos() const;
int GetBitsPos() const;
const BYTE* GetBufferPos() const { return m_pBuffer + m_nBitPos; }
Expand Down

0 comments on commit 7fba161

Please sign in to comment.