1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-20 10:17:05 +00:00

Corrected some minor out-of-style breaks, and ensured that the name of ZX81 files is returned.

This commit is contained in:
Thomas Harte
2017-07-17 19:52:54 -04:00
parent 0350925c1e
commit 130d598ec9
3 changed files with 7 additions and 7 deletions
+3
View File
@@ -50,8 +50,10 @@ static std::shared_ptr<File> ZX81FileFromData(const std::vector<uint8_t> &data)
// Look for a file name.
size_t data_pointer = 0;
std::vector<uint8_t> name_data;
int c = 11;
while(c < data.size() && c--) {
name_data.push_back(data[data_pointer] & 0x3f);
if(data[data_pointer] & 0x80) break;
data_pointer++;
}
@@ -80,6 +82,7 @@ static std::shared_ptr<File> ZX81FileFromData(const std::vector<uint8_t> &data)
// TODO: check that the line numbers declared above exist (?)
std::shared_ptr<File> file(new File);
file->name = StringFromData(name_data, true);
file->data = data;
file->isZX81 = true;
return file;