diff options
Diffstat (limited to 'src/lib/formats/dsk_dsk.cpp')
-rw-r--r-- | src/lib/formats/dsk_dsk.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/formats/dsk_dsk.cpp b/src/lib/formats/dsk_dsk.cpp index 5d72e093d67..08f76c90127 100644 --- a/src/lib/formats/dsk_dsk.cpp +++ b/src/lib/formats/dsk_dsk.cpp @@ -192,8 +192,12 @@ static floperr_t dsk_get_indexed_sector_info(floppy_image_legacy *floppy, int he if (sector_length) { *sector_length = 1 << (sector_info[pos + 3] + 7); } - if (flags) - *flags = (sector_info[pos + 5] & 0x40) ? ID_FLAG_DELETED_DATA : 0; + if (flags) { + *flags = 0; + if (sector_info[pos + 4] & 0x20) *flags |= ID_FLAG_CRC_ERROR_IN_ID_FIELD; + if (sector_info[pos + 5] & 0x20) *flags |= ID_FLAG_CRC_ERROR_IN_DATA_FIELD; + if (sector_info[pos + 5] & 0x40) *flags |= ID_FLAG_DELETED_DATA; + } return retVal; } |