mirror of
https://github.com/TomHarte/CLK.git
synced 2025-07-15 07:24:47 +00:00
Decline to try to surface tracks past the end of the disk.
This commit is contained in:
@@ -58,6 +58,7 @@ std::shared_ptr<::Storage::Disk::Track> NIB::get_track_at_position(::Storage::Di
|
|||||||
// NIBs contain data for even-numbered tracks underneath a single head only.
|
// NIBs contain data for even-numbered tracks underneath a single head only.
|
||||||
if(address.head) return nullptr;
|
if(address.head) return nullptr;
|
||||||
if(address.position.as_quarter() & 2) return nullptr;
|
if(address.position.as_quarter() & 2) return nullptr;
|
||||||
|
if(address.position.as_int() >= number_of_tracks) return nullptr;
|
||||||
|
|
||||||
long offset = file_offset(address);
|
long offset = file_offset(address);
|
||||||
std::vector<uint8_t> track_data;
|
std::vector<uint8_t> track_data;
|
||||||
|
Reference in New Issue
Block a user