1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-12 15:31:09 +00:00

Fixed: index_count_ may have been left high by a previous call; reset it just in case.

This commit is contained in:
Thomas Harte 2016-12-30 17:55:06 -05:00
parent d09e7ac1e8
commit c740d9655a

View File

@ -407,6 +407,7 @@ 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;
index_count_ = 0;
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;