mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Merge branch 'Plus10' into MFMParserDensity
This commit is contained in:
commit
ef07c33741
@ -175,7 +175,10 @@ template<class T> std::shared_ptr<Storage::Disk::Track>
|
||||
}
|
||||
|
||||
while(segment.data.size() < expected_track_bytes) shifter.add_byte(0x00);
|
||||
if(segment.data.size() > expected_track_bytes) segment.data.resize(expected_track_bytes);
|
||||
|
||||
// Allow the amount of data written to be up to 10% more than the expected size. Which is generous.
|
||||
size_t max_size = expected_track_bytes + (expected_track_bytes / 10);
|
||||
if(segment.data.size() > max_size) segment.data.resize(max_size);
|
||||
|
||||
segment.number_of_bits = (unsigned int)(segment.data.size() * 8);
|
||||
return std::shared_ptr<Storage::Disk::Track>(new Storage::Disk::PCMTrack(std::move(segment)));
|
||||
|
Loading…
Reference in New Issue
Block a user