diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-01-15 19:52:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-15 19:52:38 +0100 |
commit | 04f4eeaca2722b901a60dffd955aed993c95bd05 (patch) | |
tree | a8a16cfc59ac26bb8a56fa80d91bf311fa03810e /src/core/hle | |
parent | Merge pull request #12665 from german77/proof (diff) | |
parent | core: Support multiple modules per patcher (diff) | |
download | yuzu-04f4eeaca2722b901a60dffd955aed993c95bd05.tar yuzu-04f4eeaca2722b901a60dffd955aed993c95bd05.tar.gz yuzu-04f4eeaca2722b901a60dffd955aed993c95bd05.tar.bz2 yuzu-04f4eeaca2722b901a60dffd955aed993c95bd05.tar.lz yuzu-04f4eeaca2722b901a60dffd955aed993c95bd05.tar.xz yuzu-04f4eeaca2722b901a60dffd955aed993c95bd05.tar.zst yuzu-04f4eeaca2722b901a60dffd955aed993c95bd05.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 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, |