1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-30 22:56:03 +00:00

Made an attempt at reacting appropriately if the very first thing that looks like a sector doesn't pan out.

This commit is contained in:
Thomas Harte 2016-12-30 17:44:35 -05:00
parent 5d63556870
commit d09e7ac1e8

View File

@ -406,7 +406,8 @@ std::shared_ptr<Storage::Encodings::MFM::Sector> Parser::get_next_sector()
std::shared_ptr<Storage::Encodings::MFM::Sector> Parser::get_sector(uint8_t sector)
{
std::shared_ptr<Storage::Encodings::MFM::Sector> first_sector = get_next_sector();
std::shared_ptr<Storage::Encodings::MFM::Sector> first_sector;
while(!first_sector && index_count_ < 2) first_sector = get_next_sector();
if(!first_sector) return first_sector;
if(first_sector->sector == sector) return first_sector;