mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Merge pull request #1667 from wwylele/ncch-loader-fix
loader: only decompress code section
This commit is contained in:
commit
2b422fbcc5
1 changed files with 2 additions and 2 deletions
|
@ -174,7 +174,7 @@ ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>&
|
||||||
return ResultStatus::Error;
|
return ResultStatus::Error;
|
||||||
|
|
||||||
LOG_DEBUG(Loader, "%d sections:", kMaxSections);
|
LOG_DEBUG(Loader, "%d sections:", kMaxSections);
|
||||||
// Iterate through the ExeFs archive until we find the .code file...
|
// Iterate through the ExeFs archive until we find a section with the specified name...
|
||||||
for (unsigned section_number = 0; section_number < kMaxSections; section_number++) {
|
for (unsigned section_number = 0; section_number < kMaxSections; section_number++) {
|
||||||
const auto& section = exefs_header.section[section_number];
|
const auto& section = exefs_header.section[section_number];
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>&
|
||||||
s64 section_offset = (section.offset + exefs_offset + sizeof(ExeFs_Header) + ncch_offset);
|
s64 section_offset = (section.offset + exefs_offset + sizeof(ExeFs_Header) + ncch_offset);
|
||||||
file.Seek(section_offset, SEEK_SET);
|
file.Seek(section_offset, SEEK_SET);
|
||||||
|
|
||||||
if (is_compressed) {
|
if (strcmp(section.name, ".code") == 0 && is_compressed) {
|
||||||
// Section is compressed, read compressed .code section...
|
// Section is compressed, read compressed .code section...
|
||||||
std::unique_ptr<u8[]> temp_buffer;
|
std::unique_ptr<u8[]> temp_buffer;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue