mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +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:
parent
c18517be4b
commit
9339f3413f
@ -77,13 +77,15 @@ std::vector<File> StaticAnalyser::MSX::GetFiles(const std::shared_ptr<Storage::T
|
|||||||
file_speed = Parser::find_header(tape_player);
|
file_speed = Parser::find_header(tape_player);
|
||||||
if(!file_speed) break;
|
if(!file_speed) break;
|
||||||
int c = 256;
|
int c = 256;
|
||||||
|
bool contains_end_of_file = false;
|
||||||
while(c--) {
|
while(c--) {
|
||||||
int byte = Parser::get_byte(*file_speed, tape_player);
|
int byte = Parser::get_byte(*file_speed, tape_player);
|
||||||
if(byte == -1) break;
|
if(byte == -1) break;
|
||||||
|
contains_end_of_file |= (byte == 0x1a);
|
||||||
file.data.push_back(static_cast<uint8_t>(byte));
|
file.data.push_back(static_cast<uint8_t>(byte));
|
||||||
}
|
}
|
||||||
if(c != -1) break;
|
if(c != -1) break;
|
||||||
if(file.data.back() == 0x1a) {
|
if(contains_end_of_file) {
|
||||||
files.push_back(std::move(file));
|
files.push_back(std::move(file));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user