diff options
author | liamwhite <[email protected]> | 2024-01-15 13:52:38 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-15 13:52:38 -0500 |
commit | 04f4eeaca2722b901a60dffd955aed993c95bd05 (patch) | |
tree | a8a16cfc59ac26bb8a56fa80d91bf311fa03810e /src/core/hle/kernel | |
parent | 2e4b32204cd3fccb1b07e446239fa6be06066de4 (diff) | |
parent | d4acdac168e4b445fc8cb2e0d5e15616c5dc7dbf (diff) | |
download | yuzu-android-04f4eeaca2722b901a60dffd955aed993c95bd05.tar.gz yuzu-android-04f4eeaca2722b901a60dffd955aed993c95bd05.zip |
Merge pull request #12677 from GPUCode/whyy-modders
core: Support multiple modules per patcher
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/k_process.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index ae332a550..53735a225 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -1239,10 +1239,10 @@ void KProcess::LoadModule(CodeSet code_set, KProcessAddress base_addr) { ReprotectSegment(code_set.DataSegment(), Svc::MemoryPermission::ReadWrite); #ifdef HAS_NCE - if (this->IsApplication() && Settings::IsNceEnabled()) { + const auto& patch = code_set.PatchSegment(); + if (this->IsApplication() && Settings::IsNceEnabled() && patch.size != 0) { auto& buffer = m_kernel.System().DeviceMemory().buffer; const auto& code = code_set.CodeSegment(); - const auto& patch = code_set.PatchSegment(); buffer.Protect(GetInteger(base_addr + code.addr), code.size, Common::MemoryPermission::Read | Common::MemoryPermission::Execute); buffer.Protect(GetInteger(base_addr + patch.addr), patch.size, |