mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-10 17:23:40 +00:00
Corrected reading of the track size table for extended disks. My first extended disk has now loaded.
This commit is contained in:
parent
d951c8c1c2
commit
895a3cbf24
@ -27,6 +27,8 @@ CPCDSK::CPCDSK(const char *file_name) :
|
|||||||
head_count_ = (unsigned int)fgetc(file_);
|
head_count_ = (unsigned int)fgetc(file_);
|
||||||
|
|
||||||
if(is_extended_) {
|
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++) {
|
for(unsigned int c = 0; c < head_position_count_ * head_count_; c++) {
|
||||||
track_sizes_.push_back((size_t)(fgetc(file_) << 8));
|
track_sizes_.push_back((size_t)(fgetc(file_) << 8));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user