Removed unreachable code (#8918)

This commit is contained in:
Andrew Murray 2025-06-01 15:41:48 +10:00 committed by GitHub
parent d730e60078
commit 892fd2c2af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,11 +33,7 @@ class BitStream:
def peek(self, bits: int) -> int:
while self.bits < bits:
c = self.next()
if c < 0:
self.bits = 0
continue
self.bitbuffer = (self.bitbuffer << 8) + c
self.bitbuffer = (self.bitbuffer << 8) + self.next()
self.bits += 8
return self.bitbuffer >> (self.bits - bits) & (1 << bits) - 1