diff --git a/src/core/file_sys/title_metadata.h b/src/core/file_sys/title_metadata.h index d9d32a5fe5..11a93349a8 100644 --- a/src/core/file_sys/title_metadata.h +++ b/src/core/file_sys/title_metadata.h @@ -5,8 +5,8 @@ #pragma once #include -#include #include +#include #include #include "common/common_types.h" #include "common/swap.h" @@ -126,7 +126,7 @@ private: u32_be signature_type; std::vector tmd_signature; std::vector tmd_chunks; - std::map content_index_to_index; + std::unordered_map content_index_to_index; }; } // namespace FileSys diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 7f947dd593..f962bd7a44 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -399,8 +399,12 @@ std::string GetTitleContentPath(Service::FS::MediaType media_type, u64 tid, u16 u32 content_id = 0; FileSys::TitleMetadata tmd; if (tmd.Load(tmd_path) == Loader::ResultStatus::Success) { - if(contentIndex && tmd.ContentIndexExists(index)) { - index = tmd.ContentIndexToIndex(index); + if(contentIndex) { + if(tmd.ContentIndexExists(index)) { + index = tmd.ContentIndexToIndex(index); + } else { + LOG_ERROR(Service_AM, "Attempted to get path for non-existent content index {:04x}.", index); + } } content_id = tmd.GetContentIDByIndex(index); @@ -530,6 +534,8 @@ void Module::Interface::FindDLCContentInfos(Kernel::HLERequestContext& ctx) { u64 romfs_offset = 0; if (!tmd.ContentIndexExists(content_requested[i])) { + LOG_ERROR(Service_AM, "Attempted to get info for non-existent content index {:04x}.", content_requested[i]); + IPC::RequestBuilder rb = rp.MakeBuilder(1, 4); rb.Push(-1); // TODO: Find the right error code rb.PushMappedBuffer(content_requested_in);