summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-04-10 18:35:42 +0200
committerZach Hilman <zachhilman@gmail.com>2019-09-21 22:43:10 +0200
commit0a8e54068191c911806c7b825e4050afd65a794c (patch)
tree01a03fc4c1d010d18f45b31aa5e2e3a5f4a520f8 /src
parentsdmc_factory: Add accessor for SDMC Album directory (diff)
downloadyuzu-0a8e54068191c911806c7b825e4050afd65a794c.tar
yuzu-0a8e54068191c911806c7b825e4050afd65a794c.tar.gz
yuzu-0a8e54068191c911806c7b825e4050afd65a794c.tar.bz2
yuzu-0a8e54068191c911806c7b825e4050afd65a794c.tar.lz
yuzu-0a8e54068191c911806c7b825e4050afd65a794c.tar.xz
yuzu-0a8e54068191c911806c7b825e4050afd65a794c.tar.zst
yuzu-0a8e54068191c911806c7b825e4050afd65a794c.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/submission_package.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/file_sys/submission_package.cpp b/src/core/file_sys/submission_package.cpp
index 730221fd6..ef3084681 100644
--- a/src/core/file_sys/submission_package.cpp
+++ b/src/core/file_sys/submission_package.cpp
@@ -248,7 +248,8 @@ void NSP::InitializeExeFSAndRomFS(const std::vector<VirtualFile>& files) {
void NSP::ReadNCAs(const std::vector<VirtualFile>& files) {
for (const auto& outer_file : files) {
- if (outer_file->GetName().substr(outer_file->GetName().size() - 9) != ".cnmt.nca") {
+ if (outer_file->GetName().size() < 9 ||
+ outer_file->GetName().substr(outer_file->GetName().size() - 9) != ".cnmt.nca") {
continue;
}