mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Fix logic bug when assembling images where good sectors would be replaced by
bad ones just because they showed up later.
This commit is contained in:
@@ -196,7 +196,10 @@ void readDiskCommand(AbstractDecoder& decoder, const std::string& outputFilename
|
||||
}
|
||||
|
||||
size += sector->data.size();
|
||||
allSectors.get(sector->track, sector->side, sector->sector) = std::move(sector);
|
||||
|
||||
auto& replacing = allSectors.get(sector->track, sector->side, sector->sector);
|
||||
if (!replacing || (replacing->status != Sector::OK))
|
||||
replacing = std::move(sector);
|
||||
}
|
||||
}
|
||||
std::cout << size << " bytes decoded." << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user