1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00

Switches to ignoring the byte count, trusting the bit count entirely.

This commit is contained in:
Thomas Harte 2018-06-06 21:51:55 -04:00
parent 94359e9c75
commit 9ac21a4e71

View File

@ -115,8 +115,9 @@ std::shared_ptr<Track> WOZ::get_track_at_position(Track::Address address) {
// number of bytes that actually had data in them, then a two-byte count of the number
// of bits that were used. Other information follows but is not intended for emulation.
track_contents.data = file_.read(6646);
track_contents.data.resize(file_.get16le());
file_.seek(2, SEEK_CUR);
track_contents.number_of_bits = file_.get16le();
track_contents.data.resize((track_contents.number_of_bits + 7) >> 3);
}
return std::shared_ptr<PCMTrack>(new PCMTrack(track_contents));