D88/NFD: Add physical layout before adding sector.

Partially fixes #603, it is still busted if the number of
tracks is specified larger than what is in the image, which
used to work.
This commit is contained in:
Thomas Daede
2022-10-01 19:43:17 -07:00
parent 2f4f2083ba
commit ef5f7ec9c3
2 changed files with 2 additions and 4 deletions

View File

@@ -194,11 +194,10 @@ public:
}
Bytes data(sectorSize);
inputFile.read((char*)data.begin(), data.size());
physical->add_sector(sectorId);
const auto& sector = image->put(track, head, sectorId);
sector->status = Sector::OK;
sector->data = data;
physical->add_sector(sectorId);
}
if (mediaFlag != 0x20)