fix(disk/diskimageappledos.go): fix for badly behaved sector size spec

This commit is contained in:
April Ayres-Griffiths 2024-05-25 09:42:33 -07:00
parent f46d7ff6ee
commit a00aeed763

View File

@ -257,7 +257,11 @@ func (fd *VTOC) GetTrackOrder() int {
}
func (fd *VTOC) BytesPerSector() int {
return int(fd.Data[0x36]) + 256*int(fd.Data[0x37])
size := int(fd.Data[0x36]) + 256*int(fd.Data[0x37])
if size < 256 {
size = 256
}
return size
}
func (fd *VTOC) IsTSFree(t, s int) bool {