Added asset clash warning

This commit is contained in:
KiritoDv
2025-01-04 21:03:11 -06:00
parent 417f2a8554
commit 89215ec589
+6 -1
View File
@@ -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();