1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-20 10:17:05 +00:00

Ensured that get_sector copes even if any invalid sectors are encountered.

This commit is contained in:
Thomas Harte
2016-12-30 14:21:14 -05:00
parent 6fc692cd34
commit 82bb78fb2d
+1
View File
@@ -413,6 +413,7 @@ std::shared_ptr<Storage::Encodings::MFM::Sector> Parser::get_sector(uint8_t sect
while(1)
{
std::shared_ptr<Storage::Encodings::MFM::Sector> next_sector = get_next_sector();
if(!next_sector) continue;
if(next_sector->sector == first_sector->sector) return nullptr;
if(next_sector->sector == sector) return next_sector;
}