1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 02:17:08 +00:00

Rejigged to eliminate semi-duplication of the is-a-file test.

This commit is contained in:
Thomas Harte
2017-06-08 21:52:13 -04:00
parent b07af2660d
commit 256ba4028b
3 changed files with 13 additions and 21 deletions
+4
View File
@@ -33,6 +33,10 @@ static std::shared_ptr<File> ZX80FileFromData(const std::vector<uint8_t> &data)
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?
// It starts at 0x4028 and proceeds as [16-bit line number] [tokens] [0x76],
// but I'm as yet unable to find documentation of the tokens.
// TODO: check that the line numbers declared above exist (?)
std::shared_ptr<File> file(new File);