1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-26 09:29:45 +00:00

Attempts to fix failure to distinguish end-of-file.

This commit is contained in:
Thomas Harte 2017-12-23 19:32:24 -05:00
parent 9a7e974579
commit 0a079b0f94

View File

@ -120,7 +120,6 @@ Tape::Pulse CAS::virtual_get_next_pulse() {
if(phase_ == Phase::Gap) { if(phase_ == Phase::Gap) {
phase_ = Phase::Header; phase_ = Phase::Header;
file_pointer_ ++;
chunk_pointer_ = 0; chunk_pointer_ = 0;
distance_into_phase_ = 0; distance_into_phase_ = 0;
} }
@ -181,7 +180,8 @@ Tape::Pulse CAS::virtual_get_next_pulse() {
chunk_pointer_++; chunk_pointer_++;
if(chunk_pointer_ == files_[file_pointer_].chunks.size()) { if(chunk_pointer_ == files_[file_pointer_].chunks.size()) {
chunk_pointer_ = 0; chunk_pointer_ = 0;
phase_ = (chunk_pointer_ == files_.size()) ? Phase::EndOfFile : Phase::Gap; file_pointer_++;
phase_ = (file_pointer_ == files_.size()) ? Phase::EndOfFile : Phase::Gap;
} else { } else {
phase_ = Phase::Header; phase_ = Phase::Header;
} }