mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-23 20:29:42 +00:00
Quick extra: make sure parsed tracks don't overflow the 6400 byte space available in an MFM disk. Which might be better expressed as 6250?
This commit is contained in:
parent
cfbab1448c
commit
52b850a3f5
@ -139,5 +139,6 @@ void OricMFMDSK::store_updated_track_at_position(unsigned int head, unsigned int
|
||||
|
||||
std::lock_guard<std::mutex> lock_guard(file_access_mutex);
|
||||
fseek(file_, file_offset, SEEK_SET);
|
||||
fwrite(parsed_track.data(), 1, parsed_track.size(), file_);
|
||||
size_t track_size = std::min((size_t)6400, parsed_track.size());
|
||||
fwrite(parsed_track.data(), 1, track_size, file_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user