diff options
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 |
3 files changed, 6 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 @@ | |||
| 5 | #include <array> | 5 | #include <array> |
| 6 | #include <string> | 6 | #include <string> |
| 7 | #include <core/loader/loader.h> | 7 | #include <core/loader/loader.h> |
| 8 | #include "common/logging/log.h" | ||
| 8 | #include "core/file_sys/card_image.h" | 9 | #include "core/file_sys/card_image.h" |
| 9 | #include "core/file_sys/partition_filesystem.h" | 10 | #include "core/file_sys/partition_filesystem.h" |
| 10 | #include "core/file_sys/vfs_offset.h" | 11 | #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 79e70f6ef..8cd1f5e6a 100644 --- a/src/core/file_sys/content_archive.cpp +++ b/src/core/file_sys/content_archive.cpp | |||
| @@ -140,6 +140,10 @@ VirtualFile NCA::Decrypt(NCASectionHeader header, VirtualFile in, u64 starting_o | |||
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | NCA::NCA(VirtualFile file_) : file(std::move(file_)) { | 142 | NCA::NCA(VirtualFile file_) : file(std::move(file_)) { |
| 143 | if (file == nullptr) { | ||
| 144 | status = Loader::ResultStatus::ErrorInvalidFormat; | ||
| 145 | return; | ||
| 146 | } | ||
| 143 | if (sizeof(NCAHeader) != file->ReadObject(&header)) | 147 | if (sizeof(NCAHeader) != file->ReadObject(&header)) |
| 144 | LOG_ERROR(Loader, "File reader errored out during header read."); | 148 | LOG_ERROR(Loader, "File reader errored out during header read."); |
| 145 | 149 | ||
diff --git a/src/core/file_sys/content_archive.h b/src/core/file_sys/content_archive.h index 6492163b5..a984a4d36 100644 --- a/src/core/file_sys/content_archive.h +++ b/src/core/file_sys/content_archive.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include "common/common_funcs.h" | 12 | #include "common/common_funcs.h" |
| 13 | #include "common/common_types.h" | 13 | #include "common/common_types.h" |
| 14 | #include "common/swap.h" | 14 | #include "common/swap.h" |
| 15 | #include "control_metadata.h" | ||
| 15 | #include "core/crypto/key_manager.h" | 16 | #include "core/crypto/key_manager.h" |
| 16 | #include "core/file_sys/partition_filesystem.h" | 17 | #include "core/file_sys/partition_filesystem.h" |
| 17 | #include "core/loader/loader.h" | 18 | #include "core/loader/loader.h" |