Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan de Reuver <[email protected]>
  • Loading branch information
Schamper and Horofic authored Oct 9, 2024
1 parent ddaf9cd commit fc98b33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dissect/fve/bde/bde.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def _iter_runs(self, offset: int, length: int) -> Iterator[Run]:
region_end = region_start + region_size

# Starts outside a region but ends in or after it
if sector < region_start and sector + count > region_start:
if sector < region_start < sector + count:
remaining_sectors = min(region_start - sector, count)

yield from self._iter_run_state(sector, remaining_sectors)
Expand All @@ -448,7 +448,7 @@ def _iter_runs(self, offset: int, length: int) -> Iterator[Run]:
count -= remaining_sectors

# Starts in a region
if sector >= region_start and sector < region_end:
if region_start <= sector < region_end:
remaining_sectors = min(region_end - sector, count)

yield (BitlockerStream.RUN_SPARSE, sector, remaining_sectors)
Expand Down

0 comments on commit fc98b33

Please sign in to comment.