Ready to merge
This commit is contained in:
parent
0522fe79ff
commit
a5c6860d37
1 changed files with 4 additions and 9 deletions
|
@ -34,12 +34,9 @@ NCA::NCA(VirtualFile file_, const NCA* base_nca)
|
|||
}
|
||||
|
||||
reader = std::make_shared<NcaReader>();
|
||||
if (Result rc =
|
||||
reader->Initialize(file, GetCryptoConfiguration(), GetNcaCompressionConfiguration());
|
||||
R_FAILED(rc)) {
|
||||
if (Result rc = reader->Initialize(file, GetCryptoConfiguration(), GetNcaCompressionConfiguration()); R_FAILED(rc)) {
|
||||
if (rc != ResultInvalidNcaSignature) {
|
||||
LOG_ERROR(Loader, "File reader errored out during header read: {:#x}",
|
||||
rc.GetInnerValue());
|
||||
LOG_ERROR(Loader, "File reader errored out during header read: {:#x}", rc.GetInnerValue());
|
||||
}
|
||||
status = Loader::ResultStatus::ErrorBadNCAHeader;
|
||||
return;
|
||||
|
@ -84,10 +81,8 @@ NCA::NCA(VirtualFile file_, const NCA* base_nca)
|
|||
std::vector<VirtualFile> filesystems(fs_count);
|
||||
for (s32 i = 0; i < fs_count; i++) {
|
||||
NcaFsHeaderReader header_reader;
|
||||
const Result rc = fs.OpenStorage(&filesystems[i], &header_reader, i);
|
||||
if (R_FAILED(rc)) {
|
||||
LOG_DEBUG(Loader, "File reader errored out during read of section {}: {:#x}", i,
|
||||
rc.GetInnerValue());
|
||||
if (Result rc = fs.OpenStorage(&filesystems[i], &header_reader, i); R_FAILED(rc)) {
|
||||
LOG_DEBUG(Loader, "File reader errored out during read of section {}: {:#x}", i, rc.GetInnerValue());
|
||||
status = Loader::ResultStatus::ErrorBadNCAHeader;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue