summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2016-04-14 15:53:51 +0200
committerwwylele <wwylele@gmail.com>2016-04-14 17:33:42 +0200
commit727d508e02415101d1f49a75858e35a49220e81b (patch)
tree71b773aa2fe210e111b3da11525b8af1152c9ee9 /src
parentMerge pull request #1660 from MerryMage/file_util (diff)
downloadyuzu-727d508e02415101d1f49a75858e35a49220e81b.tar
yuzu-727d508e02415101d1f49a75858e35a49220e81b.tar.gz
yuzu-727d508e02415101d1f49a75858e35a49220e81b.tar.bz2
yuzu-727d508e02415101d1f49a75858e35a49220e81b.tar.lz
yuzu-727d508e02415101d1f49a75858e35a49220e81b.tar.xz
yuzu-727d508e02415101d1f49a75858e35a49220e81b.tar.zst
yuzu-727d508e02415101d1f49a75858e35a49220e81b.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/loader/ncch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp
index e63cab33f..a4b47ef8c 100644
--- a/src/core/loader/ncch.cpp
+++ b/src/core/loader/ncch.cpp
@@ -174,7 +174,7 @@ ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>&
return ResultStatus::Error;
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++) {
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);
file.Seek(section_offset, SEEK_SET);
- if (is_compressed) {
+ if (strcmp(section.name, ".code") == 0 && is_compressed) {
// Section is compressed, read compressed .code section...
std::unique_ptr<u8[]> temp_buffer;
try {