mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-11 15:49:38 +00:00
Avoid overrun on empty file.
This commit is contained in:
parent
19f815eeff
commit
e8aa9b9eb2
@ -80,6 +80,11 @@ std::optional<BASICAnalysis> analyse(const File &file) {
|
||||
return analysis;
|
||||
}
|
||||
|
||||
// Don't form an opinion if file is empty.
|
||||
if(file.data.empty()) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
uint16_t line_address = file.starting_address;
|
||||
int previous_line_number = -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user