From 895a3cbf248a19a4dccbb9dd4ac95548be578e51 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 7 Aug 2017 11:38:19 -0400 Subject: [PATCH] Corrected reading of the track size table for extended disks. My first extended disk has now loaded. --- Storage/Disk/Formats/CPCDSK.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Storage/Disk/Formats/CPCDSK.cpp b/Storage/Disk/Formats/CPCDSK.cpp index de4c678d6..c643aff8f 100644 --- a/Storage/Disk/Formats/CPCDSK.cpp +++ b/Storage/Disk/Formats/CPCDSK.cpp @@ -27,6 +27,8 @@ CPCDSK::CPCDSK(const char *file_name) : head_count_ = (unsigned int)fgetc(file_); if(is_extended_) { + // Skip two unused bytes and grab the track size table. + fseek(file_, 2, SEEK_CUR); for(unsigned int c = 0; c < head_position_count_ * head_count_; c++) { track_sizes_.push_back((size_t)(fgetc(file_) << 8)); }