diff options
| -rw-r--r-- | src/core/file_sys/card_image.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index fd00e5457..4375e01fa 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp | |||
| @@ -48,10 +48,12 @@ XCI::XCI(VirtualFile file_) | |||
| 48 | 48 | ||
| 49 | for (XCIPartition partition : | 49 | for (XCIPartition partition : |
| 50 | {XCIPartition::Update, XCIPartition::Normal, XCIPartition::Secure, XCIPartition::Logo}) { | 50 | {XCIPartition::Update, XCIPartition::Normal, XCIPartition::Secure, XCIPartition::Logo}) { |
| 51 | auto raw = main_hfs.GetFile(partition_names[static_cast<std::size_t>(partition)]); | 51 | const auto partition_idx = static_cast<std::size_t>(partition); |
| 52 | if (raw != nullptr) | 52 | auto raw = main_hfs.GetFile(partition_names[partition_idx]); |
| 53 | partitions[static_cast<std::size_t>(partition)] = | 53 | |
| 54 | std::make_shared<PartitionFilesystem>(raw); | 54 | if (raw != nullptr) { |
| 55 | partitions[partition_idx] = std::make_shared<PartitionFilesystem>(std::move(raw)); | ||
| 56 | } | ||
| 55 | } | 57 | } |
| 56 | 58 | ||
| 57 | secure_partition = std::make_shared<NSP>( | 59 | secure_partition = std::make_shared<NSP>( |