1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-04 01:57:54 +00:00

Merge pull request #455 from TomHarte/HumptyDumpty

Relaxes .p validation even further
This commit is contained in:
Thomas Harte 2018-05-27 17:01:07 -04:00 committed by GitHub
commit 6220ccb5d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ static std::shared_ptr<File> ZX81FileFromData(const std::vector<uint8_t> &data)
// if(data[data_pointer]) return nullptr;
uint16_t vars = short_at(data_pointer + 0x4010 - 0x4009, data);
// uint16_t vars = short_at(data_pointer + 0x4010 - 0x4009, data);
uint16_t end_of_file = short_at(data_pointer + 0x4014 - 0x4009, data);
// uint16_t display_address = short_at(0x400c - 0x4009, data);
@ -72,7 +72,7 @@ static std::shared_ptr<File> ZX81FileFromData(const std::vector<uint8_t> &data)
if(data_pointer + end_of_file - 0x4009 > data.size()) return nullptr;
// check for the proper ordering of buffers
if(vars > end_of_file) return nullptr;
// if(vars > end_of_file) return nullptr;
// if(end_of_file > display_address) return nullptr;
// TODO: does it make sense to inspect the tokenised BASIC?