dos33: add error message instead of hanging if reading too far in VTOC

was trying to use some unused parts of track $11, didn't go well
This commit is contained in:
Vince Weaver 2019-08-16 09:58:03 -04:00
parent 099759ab50
commit b2844d89ac

View File

@ -693,6 +693,11 @@ continue_parsing_catalog:
/* Read in Catalog Sector */
lseek(fd,DISK_OFFSET(catalog_track,catalog_sector),SEEK_SET);
result=read(fd,sector_buffer,BYTES_PER_SECTOR);
if (result!=BYTES_PER_SECTOR) {
fprintf(stderr,"Error reading at $%02X:$%02X\n",
catalog_track,catalog_sector);
return ERROR_NO_SPACE;
}
/* Find empty directory entry */
i=0;