diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-08 18:27:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-08 18:27:19 +0200 |
commit | fd9da4232b2f989257630884511ba50e108ad703 (patch) | |
tree | 0073d61bfa93a8ab0681623bf00428a5731b8854 /src/core/file_sys | |
parent | Merge pull request #968 from lioncash/vec (diff) | |
parent | configure_gamelist: Use explicit QVariant constructor (diff) | |
download | yuzu-fd9da4232b2f989257630884511ba50e108ad703.tar yuzu-fd9da4232b2f989257630884511ba50e108ad703.tar.gz yuzu-fd9da4232b2f989257630884511ba50e108ad703.tar.bz2 yuzu-fd9da4232b2f989257630884511ba50e108ad703.tar.lz yuzu-fd9da4232b2f989257630884511ba50e108ad703.tar.xz yuzu-fd9da4232b2f989257630884511ba50e108ad703.tar.zst yuzu-fd9da4232b2f989257630884511ba50e108ad703.zip |
Diffstat (limited to 'src/core/file_sys')
-rw-r--r-- | src/core/file_sys/card_image.cpp | 1 | ||||
-rw-r--r-- | src/core/file_sys/content_archive.cpp | 4 | ||||
-rw-r--r-- | src/core/file_sys/content_archive.h | 1 | ||||
-rw-r--r-- | src/core/file_sys/control_metadata.h | 7 |
4 files changed, 13 insertions, 0 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index 395eea8ae..e897d9913 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp @@ -5,6 +5,7 @@ #include <array> #include <string> #include <core/loader/loader.h> +#include "common/logging/log.h" #include "core/file_sys/card_image.h" #include "core/file_sys/partition_filesystem.h" #include "core/file_sys/vfs_offset.h" diff --git a/src/core/file_sys/content_archive.cpp b/src/core/file_sys/content_archive.cpp index 3529166ac..d3007d981 100644 --- a/src/core/file_sys/content_archive.cpp +++ b/src/core/file_sys/content_archive.cpp @@ -170,6 +170,10 @@ VirtualFile NCA::Decrypt(NCASectionHeader s_header, VirtualFile in, u64 starting } NCA::NCA(VirtualFile file_) : file(std::move(file_)) { + if (file == nullptr) { + status = Loader::ResultStatus::ErrorInvalidFormat; + return; + } if (sizeof(NCAHeader) != file->ReadObject(&header)) LOG_ERROR(Loader, "File reader errored out during header read."); diff --git a/src/core/file_sys/content_archive.h b/src/core/file_sys/content_archive.h index a8879d9a8..5cfd5031a 100644 --- a/src/core/file_sys/content_archive.h +++ b/src/core/file_sys/content_archive.h @@ -12,6 +12,7 @@ #include "common/common_funcs.h" #include "common/common_types.h" #include "common/swap.h" +#include "control_metadata.h" #include "core/crypto/key_manager.h" #include "core/file_sys/partition_filesystem.h" #include "core/loader/loader.h" diff --git a/src/core/file_sys/control_metadata.h b/src/core/file_sys/control_metadata.h index cc3b745f7..6582cc240 100644 --- a/src/core/file_sys/control_metadata.h +++ b/src/core/file_sys/control_metadata.h @@ -62,6 +62,13 @@ enum class Language : u8 { Chinese = 14, }; +static constexpr std::array<const char*, 15> LANGUAGE_NAMES = { + "AmericanEnglish", "BritishEnglish", "Japanese", + "French", "German", "LatinAmericanSpanish", + "Spanish", "Italian", "Dutch", + "CanadianFrench", "Portugese", "Russian", + "Korean", "Taiwanese", "Chinese"}; + // A class representing the format used by NX metadata files, typically named Control.nacp. // These store application name, dev name, title id, and other miscellaneous data. class NACP { |