1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-19 08:31:11 +00:00

Liberalises the end-of-file test for MSX ASCII.

From: must be back padded with 0x1a to merely must contain 0x1a.
This commit is contained in:
Thomas Harte 2017-12-29 20:54:10 -05:00
parent c18517be4b
commit 9339f3413f

View File

@ -77,13 +77,15 @@ std::vector<File> StaticAnalyser::MSX::GetFiles(const std::shared_ptr<Storage::T
file_speed = Parser::find_header(tape_player);
if(!file_speed) break;
int c = 256;
bool contains_end_of_file = false;
while(c--) {
int byte = Parser::get_byte(*file_speed, tape_player);
if(byte == -1) break;
contains_end_of_file |= (byte == 0x1a);
file.data.push_back(static_cast<uint8_t>(byte));
}
if(c != -1) break;
if(file.data.back() == 0x1a) {
if(contains_end_of_file) {
files.push_back(std::move(file));
break;
}