diff options
author | bunnei <bunneidev@gmail.com> | 2019-04-10 01:16:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-10 01:16:37 +0200 |
commit | 61f63bb994e358b925771bd51898822573e5780e (patch) | |
tree | a6a9f12b12b5946c04ccaf0856e0f3a94bbffe17 /src/core/loader | |
parent | Merge pull request #2366 from FernandoS27/xmad-fix (diff) | |
parent | patch_manager: Dump NSO name with build ID (diff) | |
download | yuzu-61f63bb994e358b925771bd51898822573e5780e.tar yuzu-61f63bb994e358b925771bd51898822573e5780e.tar.gz yuzu-61f63bb994e358b925771bd51898822573e5780e.tar.bz2 yuzu-61f63bb994e358b925771bd51898822573e5780e.tar.lz yuzu-61f63bb994e358b925771bd51898822573e5780e.tar.xz yuzu-61f63bb994e358b925771bd51898822573e5780e.tar.zst yuzu-61f63bb994e358b925771bd51898822573e5780e.zip |
Diffstat (limited to 'src/core/loader')
-rw-r--r-- | src/core/loader/nso.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index ffe2eea8a..d7c47c197 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp @@ -21,6 +21,8 @@ #include "core/memory.h" #include "core/settings.h" +#pragma optimize("", off) + namespace Loader { namespace { struct MODHeader { @@ -136,13 +138,13 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process, // Apply patches if necessary if (pm && (pm->HasNSOPatch(nso_header.build_id) || Settings::values.dump_nso)) { - std::vector<u8> pi_header(sizeof(NSOHeader) + program_image.size()); + std::vector<u8> pi_header; pi_header.insert(pi_header.begin(), reinterpret_cast<u8*>(&nso_header), reinterpret_cast<u8*>(&nso_header) + sizeof(NSOHeader)); pi_header.insert(pi_header.begin() + sizeof(NSOHeader), program_image.begin(), program_image.end()); - pi_header = pm->PatchNSO(pi_header); + pi_header = pm->PatchNSO(pi_header, file.GetName()); std::copy(pi_header.begin() + sizeof(NSOHeader), pi_header.end(), program_image.begin()); } |