diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-09-16 17:40:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-16 17:40:17 +0200 |
commit | 62d473305df295a3b8e955e6a2a05a1105ef893d (patch) | |
tree | 114ea862538652c81c14c282b81a29816fe5c2d1 /src/core/loader/nso.cpp | |
parent | Merge pull request #11499 from Squall-Leonhart/bitlockerfix (diff) | |
parent | core: improve debug workflow (diff) | |
download | yuzu-62d473305df295a3b8e955e6a2a05a1105ef893d.tar yuzu-62d473305df295a3b8e955e6a2a05a1105ef893d.tar.gz yuzu-62d473305df295a3b8e955e6a2a05a1105ef893d.tar.bz2 yuzu-62d473305df295a3b8e955e6a2a05a1105ef893d.tar.lz yuzu-62d473305df295a3b8e955e6a2a05a1105ef893d.tar.xz yuzu-62d473305df295a3b8e955e6a2a05a1105ef893d.tar.zst yuzu-62d473305df295a3b8e955e6a2a05a1105ef893d.zip |
Diffstat (limited to 'src/core/loader/nso.cpp')
-rw-r--r-- | src/core/loader/nso.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 549822506..1350da8dc 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp @@ -127,13 +127,14 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core:: } // Apply patches if necessary - if (pm && (pm->HasNSOPatch(nso_header.build_id) || Settings::values.dump_nso)) { + const auto name = nso_file.GetName(); + if (pm && (pm->HasNSOPatch(nso_header.build_id, name) || Settings::values.dump_nso)) { std::vector<u8> pi_header(sizeof(NSOHeader) + program_image.size()); std::memcpy(pi_header.data(), &nso_header, sizeof(NSOHeader)); std::memcpy(pi_header.data() + sizeof(NSOHeader), program_image.data(), program_image.size()); - pi_header = pm->PatchNSO(pi_header, nso_file.GetName()); + pi_header = pm->PatchNSO(pi_header, name); std::copy(pi_header.begin() + sizeof(NSOHeader), pi_header.end(), program_image.data()); } |