2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

core: hle: kernel: KPageTable: Fix UnmapPages.

- Fixes a logic bug in KPageTable::UnmapPages.
This commit is contained in:
bunnei 2022-02-18 23:48:16 -08:00
parent 83a84f1c2d
commit c9260a75f6

View file

@ -681,9 +681,8 @@ ResultCode KPageTable::UnmapPages(VAddr addr, const KPageLinkedList& page_linked
VAddr cur_addr{addr}; VAddr cur_addr{addr};
for (const auto& node : page_linked_list.Nodes()) { for (const auto& node : page_linked_list.Nodes()) {
const std::size_t num_pages{(addr - cur_addr) / PageSize}; if (const auto result{Operate(cur_addr, node.GetNumPages(), KMemoryPermission::None,
if (const auto result{ OperationType::Unmap)};
Operate(addr, num_pages, KMemoryPermission::None, OperationType::Unmap)};
result.IsError()) { result.IsError()) {
return result; return result;
} }