summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/content_archive.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-09-04 00:46:56 +0200
committerZach Hilman <zachhilman@gmail.com>2018-09-04 22:24:24 +0200
commit92e26df00f12de2e084ceb84d17ca79c5323a315 (patch)
tree4c08acfc0921310b230275a94559979d14c3e2cb /src/core/file_sys/content_archive.cpp
parentgame_list: Fix version display on non-NAND titles (diff)
downloadyuzu-92e26df00f12de2e084ceb84d17ca79c5323a315.tar
yuzu-92e26df00f12de2e084ceb84d17ca79c5323a315.tar.gz
yuzu-92e26df00f12de2e084ceb84d17ca79c5323a315.tar.bz2
yuzu-92e26df00f12de2e084ceb84d17ca79c5323a315.tar.lz
yuzu-92e26df00f12de2e084ceb84d17ca79c5323a315.tar.xz
yuzu-92e26df00f12de2e084ceb84d17ca79c5323a315.tar.zst
yuzu-92e26df00f12de2e084ceb84d17ca79c5323a315.zip
Diffstat (limited to 'src/core/file_sys/content_archive.cpp')
-rw-r--r--src/core/file_sys/content_archive.cpp8
1 files changed, 6 insertions, 2 deletions
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;
}