summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-07-30 18:46:23 +0200
committerZach Hilman <zachhilman@gmail.com>2018-08-01 06:16:54 +0200
commit187d8e215fb157edaa9f3976bebba9a9a7ed103d (patch)
tree140cbfbd109281adc87c9c79ee07976ba54888cd /src/core/file_sys
parentUse static const instead of const static (diff)
downloadyuzu-187d8e215fb157edaa9f3976bebba9a9a7ed103d.tar
yuzu-187d8e215fb157edaa9f3976bebba9a9a7ed103d.tar.gz
yuzu-187d8e215fb157edaa9f3976bebba9a9a7ed103d.tar.bz2
yuzu-187d8e215fb157edaa9f3976bebba9a9a7ed103d.tar.lz
yuzu-187d8e215fb157edaa9f3976bebba9a9a7ed103d.tar.xz
yuzu-187d8e215fb157edaa9f3976bebba9a9a7ed103d.tar.zst
yuzu-187d8e215fb157edaa9f3976bebba9a9a7ed103d.zip
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/content_archive.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/file_sys/content_archive.cpp b/src/core/file_sys/content_archive.cpp
index cb59c0a2b..2deb727cc 100644
--- a/src/core/file_sys/content_archive.cpp
+++ b/src/core/file_sys/content_archive.cpp
@@ -156,9 +156,9 @@ NCA::NCA(VirtualFile file_) : file(std::move(file_)) {
encrypted = true;
} else {
if (!keys.HasKey(Core::Crypto::S256KeyType::Header))
- status = Loader::ResultStatus::ErrorEncrypted;
+ status = Loader::ResultStatus::ErrorMissingKeys;
else
- status = Loader::ResultStatus::ErrorInvalidFormat;
+ status = Loader::ResultStatus::ErrorDecrypting;
return;
}
}
@@ -194,6 +194,9 @@ NCA::NCA(VirtualFile file_) : file(std::move(file_)) {
if (dec != nullptr) {
files.emplace_back();
romfs = files.back();
+ } else {
+ status = Loader::ResultStatus::ErrorMissingKeys;
+ return;
}
} else if (section.raw.header.filesystem_type == NCASectionFilesystemType::PFS0) {
u64 offset = (static_cast<u64>(header.section_tables[i].media_offset) *
@@ -211,6 +214,9 @@ NCA::NCA(VirtualFile file_) : file(std::move(file_)) {
if (IsDirectoryExeFS(dirs.back()))
exefs = dirs.back();
}
+ } else {
+ status = Loader::ResultStatus::ErrorMissingKeys;
+ return;
}
}
}