mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-20 14:29:11 +00:00
Decline to try to surface tracks past the end of the disk.
This commit is contained in:
parent
cbe5e69aa1
commit
ada627d027
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user