diff options
author | bunnei <bunneidev@gmail.com> | 2022-02-19 08:48:16 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2022-02-19 08:48:16 +0100 |
commit | c9260a75f67f256f23ed4e4e13154257ed0575a0 (patch) | |
tree | a1aaab461aaa27fae3241dca557bb975502bf48f /src/core | |
parent | Merge pull request #7900 from german77/enter (diff) | |
download | yuzu-c9260a75f67f256f23ed4e4e13154257ed0575a0.tar yuzu-c9260a75f67f256f23ed4e4e13154257ed0575a0.tar.gz yuzu-c9260a75f67f256f23ed4e4e13154257ed0575a0.tar.bz2 yuzu-c9260a75f67f256f23ed4e4e13154257ed0575a0.tar.lz yuzu-c9260a75f67f256f23ed4e4e13154257ed0575a0.tar.xz yuzu-c9260a75f67f256f23ed4e4e13154257ed0575a0.tar.zst yuzu-c9260a75f67f256f23ed4e4e13154257ed0575a0.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_page_table.cpp | 5 |
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; } |