mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-13 22:32:03 +00:00
Missed from previous commit; removed assumption that get_next_data always succeeds.
This commit is contained in:
parent
54557d7f13
commit
2b053436e5
@ -378,16 +378,18 @@ std::list<File> StaticAnalyser::Commodore::GetFiles(const std::shared_ptr<Storag
|
|||||||
case Header::NonRelocatableProgram:
|
case Header::NonRelocatableProgram:
|
||||||
{
|
{
|
||||||
std::unique_ptr<Data> data = parser.get_next_data();
|
std::unique_ptr<Data> data = parser.get_next_data();
|
||||||
|
if(data)
|
||||||
|
{
|
||||||
|
File new_file;
|
||||||
|
new_file.name = header->name;
|
||||||
|
new_file.raw_name = header->raw_name;
|
||||||
|
new_file.starting_address = header->starting_address;
|
||||||
|
new_file.ending_address = header->ending_address;
|
||||||
|
new_file.data.swap(data->data);
|
||||||
|
new_file.type = (header->type == Header::RelocatableProgram) ? File::RelocatableProgram : File::NonRelocatableProgram;
|
||||||
|
|
||||||
File new_file;
|
file_list.push_back(new_file);
|
||||||
new_file.name = header->name;
|
}
|
||||||
new_file.raw_name = header->raw_name;
|
|
||||||
new_file.starting_address = header->starting_address;
|
|
||||||
new_file.ending_address = header->ending_address;
|
|
||||||
new_file.data.swap(data->data);
|
|
||||||
new_file.type = (header->type == Header::RelocatableProgram) ? File::RelocatableProgram : File::NonRelocatableProgram;
|
|
||||||
|
|
||||||
file_list.push_back(new_file);
|
|
||||||
|
|
||||||
header = parser.get_next_header();
|
header = parser.get_next_header();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user