1
0
mirror of https://github.com/simh/simh.git synced 2026-02-17 21:18:27 +00:00

AltairZ80: Fix error handling of bad IMD disks and sector size computation

This commit is contained in:
Peter Schorn
2020-02-18 11:55:29 +01:00
parent 7e58080fb5
commit 6c84387ec0
2 changed files with 4 additions and 2 deletions

View File

@@ -164,7 +164,7 @@ static t_stat diskParse(DISK_INFO *myDisk, uint32 isVerbose)
sim_fread(&imd, 1, 5, myDisk->file);
if (feof(myDisk->file))
break;
sectorSize = 128 << imd.sectsize;
sectorSize = 128 << (imd.sectsize & 0x1f);
sectorHeadwithFlags = imd.head; /*AGN save the head and flags */
imd.head &= 1 ; /*AGN mask out flag bits to head 0 or 1 */