summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-02-21 21:38:52 +0100
committerGitHub <noreply@github.com>2022-02-21 21:38:52 +0100
commit8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a (patch)
tree4e5ad04403eac4b738b5fbb62c0c2731cd8afc40 /src
parentMerge pull request #7867 from german77/amiibo (diff)
parentcore: hle: kernel: KPageTable: Fix UnmapPages. (diff)
downloadyuzu-8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a.tar
yuzu-8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a.tar.gz
yuzu-8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a.tar.bz2
yuzu-8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a.tar.lz
yuzu-8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a.tar.xz
yuzu-8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a.tar.zst
yuzu-8d46c3cc66f20cd817b2dd1ca713d7b7afb25d6a.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/k_page_table.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp
index 912853e5c..a9eb70b8b 100644
--- a/src/core/hle/kernel/k_page_table.cpp
+++ b/src/core/hle/kernel/k_page_table.cpp
@@ -681,9 +681,8 @@ ResultCode KPageTable::UnmapPages(VAddr addr, const KPageLinkedList& page_linked
VAddr cur_addr{addr};
for (const auto& node : page_linked_list.Nodes()) {
- const std::size_t num_pages{(addr - cur_addr) / PageSize};
- if (const auto result{
- Operate(addr, num_pages, KMemoryPermission::None, OperationType::Unmap)};
+ if (const auto result{Operate(cur_addr, node.GetNumPages(), KMemoryPermission::None,
+ OperationType::Unmap)};
result.IsError()) {
return result;
}