Removed unreachable code by radarhere · Pull Request #8918 · python-pillow/Pillow
Conversation
| def i8(c: bytes) -> int: | |
| return c[0] |
| def next(self) -> int: | |
| return i8(self.fp.read(1)) | |
| def peek(self, bits: int) -> int: | |
| while self.bits < bits: | |
| c = self.next() | |
| if c < 0: | |
| self.bits = 0 | |
| continue |
c < 0 will never be True. The value can range from 0 to 255, but will never be less than zero.
Ok. Fair enough.
Unless it is double masked on purpose, but
I wouldn't see much of an issue, other than a dead body. At which point, I'm not much of a facilitator of anything.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters