Skip to content

Commit

Permalink
Added asset clash warning
Browse files Browse the repository at this point in the history
  • Loading branch information
KiritoDv committed Jan 5, 2025
1 parent 417f2a8 commit 89215ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Companion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 89215ec

Please sign in to comment.