diff options
Diffstat (limited to 'src/core/loader/xci.cpp')
| -rw-r--r-- | src/core/loader/xci.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp index 9dc4d1f35..75b998faa 100644 --- a/src/core/loader/xci.cpp +++ b/src/core/loader/xci.cpp | |||
| @@ -17,8 +17,7 @@ namespace Loader { | |||
| 17 | 17 | ||
| 18 | AppLoader_XCI::AppLoader_XCI(FileSys::VirtualFile file) | 18 | AppLoader_XCI::AppLoader_XCI(FileSys::VirtualFile file) |
| 19 | : AppLoader(file), xci(std::make_unique<FileSys::XCI>(file)), | 19 | : AppLoader(file), xci(std::make_unique<FileSys::XCI>(file)), |
| 20 | nca_loader(std::make_unique<AppLoader_NCA>( | 20 | nca_loader(std::make_unique<AppLoader_NCA>(xci->GetProgramNCAFile())) { |
| 21 | xci->GetNCAFileByType(FileSys::NCAContentType::Program))) { | ||
| 22 | if (xci->GetStatus() != ResultStatus::Success) | 21 | if (xci->GetStatus() != ResultStatus::Success) |
| 23 | return; | 22 | return; |
| 24 | const auto control_nca = xci->GetNCAByType(FileSys::NCAContentType::Control); | 23 | const auto control_nca = xci->GetNCAByType(FileSys::NCAContentType::Control); |
| @@ -64,11 +63,11 @@ ResultStatus AppLoader_XCI::Load(Kernel::SharedPtr<Kernel::Process>& process) { | |||
| 64 | if (xci->GetProgramNCAStatus() != ResultStatus::Success) | 63 | if (xci->GetProgramNCAStatus() != ResultStatus::Success) |
| 65 | return xci->GetProgramNCAStatus(); | 64 | return xci->GetProgramNCAStatus(); |
| 66 | 65 | ||
| 67 | const auto nca = xci->GetNCAFileByType(FileSys::NCAContentType::Program); | 66 | const auto nca = xci->GetProgramNCA(); |
| 68 | if (nca == nullptr && !Core::Crypto::KeyManager::KeyFileExists(false)) | 67 | if (nca == nullptr && !Core::Crypto::KeyManager::KeyFileExists(false)) |
| 69 | return ResultStatus::ErrorMissingProductionKeyFile; | 68 | return ResultStatus::ErrorMissingProductionKeyFile; |
| 70 | 69 | ||
| 71 | auto result = nca_loader->Load(process); | 70 | const auto result = nca_loader->Load(process); |
| 72 | if (result != ResultStatus::Success) | 71 | if (result != ResultStatus::Success) |
| 73 | return result; | 72 | return result; |
| 74 | 73 | ||