From 371f109a84a7560a38bafa0284782fdc461ad825 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 8 Dec 2023 23:41:14 -0500 Subject: [PATCH] Fix mark locations. --- Storage/Disk/DiskImage/Formats/NIB.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Storage/Disk/DiskImage/Formats/NIB.cpp b/Storage/Disk/DiskImage/Formats/NIB.cpp index 64ddf2370..53434b529 100644 --- a/Storage/Disk/DiskImage/Formats/NIB.cpp +++ b/Storage/Disk/DiskImage/Formats/NIB.cpp @@ -72,7 +72,8 @@ std::shared_ptr<::Storage::Disk::Track> NIB::get_track_at_position(::Storage::Di // NIB files leave sync bytes implicit and make no guarantees // about overall track positioning. The attempt works by locating - // any runs of FF and marking the last five as including slip bits. + // any single run of FF that is sufficiently long and marking the last + // five as including slip bits. std::set sync_locations; for(size_t index = 0; index < track_data.size(); ++index) { // Count the number of FFs starting from here. @@ -87,8 +88,9 @@ std::shared_ptr<::Storage::Disk::Track> NIB::get_track_at_position(::Storage::Di if(length >= 5) { for(int c = 0; c < 5; c++) { end = (end + track_data.size() - 1) % track_data.size(); - sync_locations.insert(index); + sync_locations.insert(end); } +// break; } }