diff options
| author | petrie911 <69443847+petrie911@users.noreply.github.com> | 2024-03-21 13:31:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-21 12:31:25 -0600 |
| commit | 6e9f82312178d1fbc002a04ce97cf8b5add1f402 (patch) | |
| tree | 9ffd8de9d637231acfe0b045ba8924214137e60a | |
| parent | 4039f80fa42b470262238eab34cbba69f9d42ed6 (diff) | |
Fix segfault issue with headers (#48)
* segfault
* fix segfault
| -rw-r--r-- | src/Companion.cpp | 4 | ||||
| -rw-r--r-- | src/factories/sf64/MessageLookupFactory.cpp | 1 | ||||
| -rw-r--r-- | src/factories/sf64/ObjInitFactory.cpp | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/Companion.cpp b/src/Companion.cpp index d52b40d..4b2b234 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -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"; } diff --git a/src/factories/sf64/MessageLookupFactory.cpp b/src/factories/sf64/MessageLookupFactory.cpp index 6a7b221..5317a40 100644 --- a/src/factories/sf64/MessageLookupFactory.cpp +++ b/src/factories/sf64/MessageLookupFactory.cpp @@ -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 ) { diff --git a/src/factories/sf64/ObjInitFactory.cpp b/src/factories/sf64/ObjInitFactory.cpp index 791535c..8a18033 100644 --- a/src/factories/sf64/ObjInitFactory.cpp +++ b/src/factories/sf64/ObjInitFactory.cpp @@ -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 ) { |
