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>();
|
reader = std::make_shared<NcaReader>();
|
||||||
if (Result rc =
|
if (Result rc = reader->Initialize(file, GetCryptoConfiguration(), GetNcaCompressionConfiguration()); R_FAILED(rc)) {
|
||||||
reader->Initialize(file, GetCryptoConfiguration(), GetNcaCompressionConfiguration());
|
|
||||||
R_FAILED(rc)) {
|
|
||||||
if (rc != ResultInvalidNcaSignature) {
|
if (rc != ResultInvalidNcaSignature) {
|
||||||
LOG_ERROR(Loader, "File reader errored out during header read: {:#x}",
|
LOG_ERROR(Loader, "File reader errored out during header read: {:#x}", rc.GetInnerValue());
|
||||||
rc.GetInnerValue());
|
|
||||||
}
|
}
|
||||||
status = Loader::ResultStatus::ErrorBadNCAHeader;
|
status = Loader::ResultStatus::ErrorBadNCAHeader;
|
||||||
return;
|
return;
|
||||||
|
@ -84,10 +81,8 @@ NCA::NCA(VirtualFile file_, const NCA* base_nca)
|
||||||
std::vector<VirtualFile> filesystems(fs_count);
|
std::vector<VirtualFile> filesystems(fs_count);
|
||||||
for (s32 i = 0; i < fs_count; i++) {
|
for (s32 i = 0; i < fs_count; i++) {
|
||||||
NcaFsHeaderReader header_reader;
|
NcaFsHeaderReader header_reader;
|
||||||
const Result rc = fs.OpenStorage(&filesystems[i], &header_reader, i);
|
if (Result rc = fs.OpenStorage(&filesystems[i], &header_reader, i); R_FAILED(rc)) {
|
||||||
if (R_FAILED(rc)) {
|
LOG_DEBUG(Loader, "File reader errored out during read of section {}: {:#x}", i, rc.GetInnerValue());
|
||||||
LOG_DEBUG(Loader, "File reader errored out during read of section {}: {:#x}", i,
|
|
||||||
rc.GetInnerValue());
|
|
||||||
status = Loader::ResultStatus::ErrorBadNCAHeader;
|
status = Loader::ResultStatus::ErrorBadNCAHeader;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue