From 92e26df00f12de2e084ceb84d17ca79c5323a315 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 3 Sep 2018 18:46:56 -0400 Subject: nsp: Fix error masking issue with XCI files Now display correct error instead of catch-all MissingProgramNCA --- src/core/file_sys/content_archive.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/core/file_sys/content_archive.cpp') diff --git a/src/core/file_sys/content_archive.cpp b/src/core/file_sys/content_archive.cpp index 26e1daf55..1c093d94f 100644 --- a/src/core/file_sys/content_archive.cpp +++ b/src/core/file_sys/content_archive.cpp @@ -444,6 +444,12 @@ NCA::NCA(VirtualFile file_, VirtualFile bktr_base_romfs_, u64 bktr_base_ivfc_off dirs.push_back(std::move(npfs)); if (IsDirectoryExeFS(dirs.back())) exefs = dirs.back(); + } else { + if (has_rights_id) + status = Loader::ResultStatus::ErrorIncorrectTitlekeyOrTitlekek; + else + status = Loader::ResultStatus::ErrorIncorrectKeyAreaKey; + return; } } else { if (status != Loader::ResultStatus::Success) @@ -491,8 +497,6 @@ NCAContentType NCA::GetType() const { u64 NCA::GetTitleId() const { if (is_update || status == Loader::ResultStatus::ErrorMissingBKTRBaseRomFS) return header.title_id | 0x800; - if (status != Loader::ResultStatus::Success) - return {}; return header.title_id; } -- cgit v1.2.3