summaryrefslogtreecommitdiffstats
path: root/src/core/loader
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-03-28 01:08:56 +0100
committerZach Hilman <zachhilman@gmail.com>2019-03-28 01:09:01 +0100
commit552d5071fa171165e4054392d8bb6bf2ecc924e2 (patch)
tree014cc0643200c213c59dd0df48e948a3117a02c0 /src/core/loader
parentgame_list: Register content with ContentProvider (diff)
downloadyuzu-552d5071fa171165e4054392d8bb6bf2ecc924e2.tar
yuzu-552d5071fa171165e4054392d8bb6bf2ecc924e2.tar.gz
yuzu-552d5071fa171165e4054392d8bb6bf2ecc924e2.tar.bz2
yuzu-552d5071fa171165e4054392d8bb6bf2ecc924e2.tar.lz
yuzu-552d5071fa171165e4054392d8bb6bf2ecc924e2.tar.xz
yuzu-552d5071fa171165e4054392d8bb6bf2ecc924e2.tar.zst
yuzu-552d5071fa171165e4054392d8bb6bf2ecc924e2.zip
Diffstat (limited to 'src/core/loader')
-rw-r--r--src/core/loader/nso.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp
index 714d85a59..c766070e7 100644
--- a/src/core/loader/nso.cpp
+++ b/src/core/loader/nso.cpp
@@ -20,6 +20,8 @@
#include "core/memory.h"
#include "core/settings.h"
+#pragma optimize("", off)
+
namespace Loader {
namespace {
struct MODHeader {
@@ -139,13 +141,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());
}