From 7e51284cb1e882738b1a9b21271806a582cd85a0 Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Sat, 1 Oct 2016 18:42:02 -0700 Subject: [PATCH] Fix for non-standard boot headers using a single sector instead of usual minimum of 3 sectors --- atrcopy/diskimages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atrcopy/diskimages.py b/atrcopy/diskimages.py index 93fb176..73b06ca 100644 --- a/atrcopy/diskimages.py +++ b/atrcopy/diskimages.py @@ -362,7 +362,7 @@ class BootDiskImage(DiskImageBase): max_ram = 0xc000 max_size = max_ram - bload max_sectors = max_size / self.header.sector_size - if nsec > max_sectors or nsec < 3: + if nsec > max_sectors or nsec < 1: raise InvalidDiskImage("Number of boot sectors out of range") if bload < 0x200 or bload > (0xc000 - (nsec * self.header.sector_size)): raise InvalidDiskImage("Bad boot load address")