mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Merge pull request #703 from TomHarte/Sup133
Fixed: the final track field in an MSA is inclusive, not exclusive.
This commit is contained in:
commit
daacd6805e
@ -80,7 +80,7 @@ std::shared_ptr<::Storage::Disk::Track> MSA::get_track_at_position(::Storage::Di
|
||||
|
||||
const auto position = address.position.as_int();
|
||||
if(position < starting_track_) return nullptr;
|
||||
if(position >= ending_track_) return nullptr;
|
||||
if(position > ending_track_) return nullptr;
|
||||
|
||||
const auto &track = uncompressed_tracks_[size_t(position - starting_track_) * size_t(sides_) + size_t(address.head)];
|
||||
assert(!track.empty());
|
||||
@ -88,7 +88,7 @@ std::shared_ptr<::Storage::Disk::Track> MSA::get_track_at_position(::Storage::Di
|
||||
}
|
||||
|
||||
HeadPosition MSA::get_maximum_head_position() {
|
||||
return HeadPosition(ending_track_);
|
||||
return HeadPosition(ending_track_ + 1);
|
||||
}
|
||||
|
||||
int MSA::get_head_count() {
|
||||
|
Loading…
Reference in New Issue
Block a user