mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2024-12-01 09:49:42 +00:00
Fixed off-by-one error for sector number validity check
This commit is contained in:
parent
e593788227
commit
8172194fbe
@ -68,7 +68,7 @@ class AtrHeader(object):
|
||||
self.max_sectors = self.size_in_bytes / self.sector_size
|
||||
|
||||
def sector_is_valid(self, sector):
|
||||
return sector >= 0 and sector < self.max_sectors
|
||||
return sector > 0 and sector <= self.max_sectors
|
||||
|
||||
def get_pos(self, sector):
|
||||
if not self.sector_is_valid(sector):
|
||||
|
Loading…
Reference in New Issue
Block a user