Fix segfault issue with headers (#48)

* segfault

* fix segfault
This commit is contained in:
petrie911
2024-03-21 12:31:25 -06:00
committed by GitHub
parent 4039f80fa4
commit 6e9f823121
3 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -786,7 +786,7 @@ void Companion::Process() {
SPDLOG_WARN("Creating pad of 0x{:X} bytes", gap);
const auto padfile = this->gCurrentDirectory.filename().string();
if(this->IsDebug()){
stream << "// 0x" << std::hex << startptr << "\n";
stream << "// 0x" << std::hex << std::uppercase << startptr << "\n";
}
stream << "char pad_" << padfile << "_" << std::to_string(gCurrentPad++) << "[] = {\n" << tab;
auto gapSize = gap & ~3;
@@ -795,7 +795,7 @@ void Companion::Process() {
}
stream << "\n};\n";
if(this->IsDebug()){
stream << "// 0x" << std::hex << end << "\n\n";
stream << "// 0x" << std::hex << std::uppercase << end << "\n\n";
} else {
stream << "\n";
}
@@ -13,6 +13,7 @@ ExportResult SF64::MessageLookupHeaderExporter::Export(std::ostream &write, std:
}
write << "extern MsgLookup " << symbol << "[];\n";
return std::nullopt;
}
ExportResult SF64::MessageLookupCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
+1
View File
@@ -14,6 +14,7 @@ ExportResult SF64::ObjInitHeaderExporter::Export(std::ostream &write, std::share
}
write << "extern ObjectInit " << symbol << "[];\n";
return std::nullopt;
}
ExportResult SF64::ObjInitCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {