1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-19 19:16:34 +00:00

Fixes: individual static analysers reset tapes, for potential successors. The ZX81 file analyser no longer overruns its buffer upon receiving a file that is shorter than 11 bytes.

This commit is contained in:
Thomas Harte
2017-07-12 21:34:08 -04:00
parent f09fe30af5
commit 33d16ae0cd
5 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ static std::shared_ptr<File> ZX81FileFromData(const std::vector<uint8_t> &data)
// Look for a file name.
size_t data_pointer = 0;
int c = 11;
while(c--) {
while(c < data.size() && c--) {
if(data[data_pointer] & 0x80) break;
data_pointer++;
}