diff options
author | GPUCode <geoster3d@gmail.com> | 2024-01-03 22:37:41 +0100 |
---|---|---|
committer | GPUCode <geoster3d@gmail.com> | 2024-01-14 23:46:05 +0100 |
commit | d4acdac168e4b445fc8cb2e0d5e15616c5dc7dbf (patch) | |
tree | 7cc9e882dcb388c5d6de528dac9065ea1717af81 /src/core/hle/kernel/k_process.cpp | |
parent | Merge pull request #12667 from t895/version-info (diff) | |
download | yuzu-d4acdac168e4b445fc8cb2e0d5e15616c5dc7dbf.tar yuzu-d4acdac168e4b445fc8cb2e0d5e15616c5dc7dbf.tar.gz yuzu-d4acdac168e4b445fc8cb2e0d5e15616c5dc7dbf.tar.bz2 yuzu-d4acdac168e4b445fc8cb2e0d5e15616c5dc7dbf.tar.lz yuzu-d4acdac168e4b445fc8cb2e0d5e15616c5dc7dbf.tar.xz yuzu-d4acdac168e4b445fc8cb2e0d5e15616c5dc7dbf.tar.zst yuzu-d4acdac168e4b445fc8cb2e0d5e15616c5dc7dbf.zip |
Diffstat (limited to '')
-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 068e71dff..8839ddbc2 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -1233,10 +1233,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, |