Skip to content

Commit

Permalink
Update dissect/util/stream.py
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan de Reuver <9864602+Horofic@users.noreply.github.com>
  • Loading branch information
Schamper and Horofic authored Jan 15, 2024
1 parent eb7ea58 commit b947295
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dissect/util/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,10 @@ def _read_fh(self, length: int) -> bytes:
offset = self._zlib_prepend_offset
self._zlib_prepend_offset += length
return self._zlib_prepend[offset : self._zlib_prepend_offset]
else:
offset = self._zlib_prepend_offset
self._zlib_prepend_offset = None
return self._zlib_prepend[offset:] + self._fh.read(length - len(self._zlib_prepend) + offset)

offset = self._zlib_prepend_offset
self._zlib_prepend_offset = None
return self._zlib_prepend[offset:] + self._fh.read(length - len(self._zlib_prepend) + offset)

def _read_zlib(self, length: int) -> bytes:
if length < 0:
Expand Down

0 comments on commit b947295

Please sign in to comment.