Skip to content

Commit 83050cc

Browse files
committed
Fully revert commit 236cf65
1 parent 46ae47c commit 83050cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bitstream/DefaultInputBitStream.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,12 @@ uint DefaultInputBitStream::readBits(byte bits[], uint count)
131131

132132
while (remaining >= 64) {
133133
const uint64 v = _current;
134-
_availBits = pullCurrent() - r;
134+
_availBits = pullCurrent();
135135

136-
if (_availBits < 0)
136+
if (_availBits < r)
137137
throw BitStreamException("No more data to read in the bitstream", BitStreamException::END_OF_STREAM);
138138

139+
_availBits -= r;
139140
BigEndian::writeLong64(&bits[start], (v << r) | (_current >> _availBits));
140141
start += 8;
141142
remaining -= 64;

0 commit comments

Comments
 (0)