summaryrefslogtreecommitdiffstats
path: root/src/core/loader/nso.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-09-14 20:34:05 +0200
committerLiam <byteslice@airmail.cc>2023-09-14 22:44:15 +0200
commit3ef9673360089b1729ff174eefad9195d8eaf97f (patch)
tree796d1f7b918f0db4c8a2024388dbb4c51c831464 /src/core/loader/nso.cpp
parentMerge pull request #11496 from liamwhite/ngc (diff)
downloadyuzu-3ef9673360089b1729ff174eefad9195d8eaf97f.tar
yuzu-3ef9673360089b1729ff174eefad9195d8eaf97f.tar.gz
yuzu-3ef9673360089b1729ff174eefad9195d8eaf97f.tar.bz2
yuzu-3ef9673360089b1729ff174eefad9195d8eaf97f.tar.lz
yuzu-3ef9673360089b1729ff174eefad9195d8eaf97f.tar.xz
yuzu-3ef9673360089b1729ff174eefad9195d8eaf97f.tar.zst
yuzu-3ef9673360089b1729ff174eefad9195d8eaf97f.zip
Diffstat (limited to '')
-rw-r--r--src/core/loader/nso.cpp5
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());
}