From 8a1b805d112bbb66180d577ecb438727451a81f4 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 19 Sep 2016 07:34:10 -0400 Subject: [PATCH] Fixed file offset calculation for single-sided images. --- Storage/Disk/Formats/SSD.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Disk/Formats/SSD.cpp b/Storage/Disk/Formats/SSD.cpp index bd5655495..30e3dd63f 100644 --- a/Storage/Disk/Formats/SSD.cpp +++ b/Storage/Disk/Formats/SSD.cpp @@ -56,7 +56,7 @@ std::shared_ptr SSD::get_track_at_position(unsigned int head, unsigned in std::shared_ptr track; if(head >= _head_count) return track; - long file_offset = (position * (_head_count ? 2 : 1) + head) * 256 * 10; + long file_offset = (position * _head_count + head) * 256 * 10; fseek(_file, file_offset, SEEK_SET); std::vector sectors;