mirror of
https://github.com/N64Recomp/N64Recomp.git
synced 2026-05-02 06:54:39 +00:00
Emit dummy value if relocatable_sections_ordered is empty
This commit is contained in:
parent
f32e47f930
commit
a97bd793a7
1 changed files with 15 additions and 11 deletions
|
|
@ -1736,6 +1736,9 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
|
|
||||||
fmt::print(overlay_file, "static int overlay_sections_by_index[] = {{\n");
|
fmt::print(overlay_file, "static int overlay_sections_by_index[] = {{\n");
|
||||||
|
if (relocatable_sections_ordered.empty()) {
|
||||||
|
fmt::print(overlay_file, " -1,\n");
|
||||||
|
} else {
|
||||||
for (const std::string& section : relocatable_sections_ordered) {
|
for (const std::string& section : relocatable_sections_ordered) {
|
||||||
// Check if this is an empty overlay
|
// Check if this is an empty overlay
|
||||||
if (section == "*") {
|
if (section == "*") {
|
||||||
|
|
@ -1750,6 +1753,7 @@ int main(int argc, char** argv) {
|
||||||
fmt::print(overlay_file, " {},\n", relocatable_section_indices[section]);
|
fmt::print(overlay_file, " {},\n", relocatable_section_indices[section]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fmt::print(overlay_file, "}};\n");
|
fmt::print(overlay_file, "}};\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue