From 89215ec589ab34ee92b5ee426e58d55738a236e4 Mon Sep 17 00:00:00 2001 From: KiritoDv Date: Sat, 4 Jan 2025 21:03:11 -0600 Subject: [PATCH] Added asset clash warning --- src/Companion.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 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(found, "type") != type) { + SPDLOG_ERROR("Asset clash detected {} vs {} at 0x{:X}", type, GetSafeNode(found, "type"), offset); + } + + return found; } auto rom = this->GetRomData();