mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +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.
|
||||
if(address.head) 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);
|
||||
std::vector<uint8_t> track_data;
|
||||
|
Loading…
Reference in New Issue
Block a user