summaryrefslogtreecommitdiff
path: root/src/Companion.cpp
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2025-01-04 21:03:11 -0600
committerKiritoDv <kiritodev01@gmail.com>2025-01-04 21:03:11 -0600
commit89215ec589ab34ee92b5ee426e58d55738a236e4 (patch)
tree298c539069e8e62cb69f2cf6477c17f02c211fda /src/Companion.cpp
parent417f2a8554f828e57eef62c59d845521be480143 (diff)
Added asset clash warning
Diffstat (limited to 'src/Companion.cpp')
-rw-r--r--src/Companion.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Companion.cpp b/src/Companion.cpp
index fadae00..d7aa11d 100644
--- a/src/Companion.cpp
+++ b/src/Companion.cpp
@@ -1449,7 +1449,12 @@ std::optional<YAML::Node> Companion::AddAsset(YAML::Node asset) {
const auto decl = this->GetNodeByAddr(offset);
if(decl.has_value()) {
- return std::get<1>(decl.value());
+ auto found = std::get<1>(decl.value());
+ if(GetSafeNode<std::string>(found, "type") != type) {
+ SPDLOG_ERROR("Asset clash detected {} vs {} at 0x{:X}", type, GetSafeNode<std::string>(found, "type"), offset);
+ }
+
+ return found;
}
auto rom = this->GetRomData();