diff options
author | bunnei <ericbunnie@gmail.com> | 2014-06-17 12:30:14 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-06-17 12:30:14 +0200 |
commit | 79a48082e2c7b6e61f38b442a66147a4e46f2911 (patch) | |
tree | 320d476cafbf05fa7ddbf95e1b0f313e826d4d1c /src | |
parent | Elf: Removed unused macros, changed #include of "common.h" to just "common_types.h". (diff) | |
download | yuzu-79a48082e2c7b6e61f38b442a66147a4e46f2911.tar yuzu-79a48082e2c7b6e61f38b442a66147a4e46f2911.tar.gz yuzu-79a48082e2c7b6e61f38b442a66147a4e46f2911.tar.bz2 yuzu-79a48082e2c7b6e61f38b442a66147a4e46f2911.tar.lz yuzu-79a48082e2c7b6e61f38b442a66147a4e46f2911.tar.xz yuzu-79a48082e2c7b6e61f38b442a66147a4e46f2911.tar.zst yuzu-79a48082e2c7b6e61f38b442a66147a4e46f2911.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/loader/ncch.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp index a01411e11..23864d262 100644 --- a/src/core/loader/ncch.cpp +++ b/src/core/loader/ncch.cpp @@ -312,20 +312,14 @@ bool Load_NCCH(std::string& filename, std::string* error_string) { // Load compressed executable... if (i == 0 && is_compressed) { - u32 decompressed_size = LZSS_GetDecompressedSize(buffer, + u32 decompressed_size = LZSS_GetDecompressedSize(buffer, exefs_header.section[i].size); - u8* decompressed_buffer = new u8[decompressed_size]; - if (!LZSS_Decompress(buffer, exefs_header.section[i].size, decompressed_buffer, + if (!LZSS_Decompress(buffer, exefs_header.section[i].size, + Memory::GetPointer(exheader_header.codeset_info.text.address), decompressed_size, error_string)) { return false; } - // Load .code section into memory... - LoadBuffer(exheader_header.codeset_info.text.address, decompressed_buffer, - decompressed_size); - - delete[] decompressed_buffer; - // Load uncompressed executable... } else { // Load .code section into memory... |