diff options
| author | 2022-01-14 23:26:04 -0800 | |
|---|---|---|
| committer | 2022-01-22 20:51:34 -0800 | |
| commit | ffcaf5af9019eb73a5d31b17e56521c49a82dffd (patch) | |
| tree | 41a15bb84bc8bdc9fc2904a8d7f23acb3c39978b /src | |
| parent | core: hle: kernel: KPageTable: Assert valid address on GetPhysicalAddr. (diff) | |
| download | yuzu-ffcaf5af9019eb73a5d31b17e56521c49a82dffd.tar.gz yuzu-ffcaf5af9019eb73a5d31b17e56521c49a82dffd.tar.xz yuzu-ffcaf5af9019eb73a5d31b17e56521c49a82dffd.zip | |
core: hle: kernel: KPageTable: SetMemoryAttribute: Various cleanup.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_page_table.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp index 2f8abcbcf..45d487004 100644 --- a/src/core/hle/kernel/k_page_table.cpp +++ b/src/core/hle/kernel/k_page_table.cpp | |||
| @@ -860,8 +860,9 @@ ResultCode KPageTable::SetMemoryAttribute(VAddr addr, std::size_t size, u32 mask | |||
| 860 | AttributeTestMask, KMemoryAttribute::None, ~AttributeTestMask)); | 860 | AttributeTestMask, KMemoryAttribute::None, ~AttributeTestMask)); |
| 861 | 861 | ||
| 862 | // Determine the new attribute. | 862 | // Determine the new attribute. |
| 863 | const auto new_attr = ((old_attr & static_cast<KMemoryAttribute>(~mask)) | | 863 | const KMemoryAttribute new_attr = |
| 864 | static_cast<KMemoryAttribute>(attr & mask)); | 864 | static_cast<KMemoryAttribute>(((old_attr & static_cast<KMemoryAttribute>(~mask)) | |
| 865 | static_cast<KMemoryAttribute>(attr & mask))); | ||
| 865 | 866 | ||
| 866 | // Perform operation. | 867 | // Perform operation. |
| 867 | this->Operate(addr, num_pages, old_perm, OperationType::ChangePermissionsAndRefresh); | 868 | this->Operate(addr, num_pages, old_perm, OperationType::ChangePermissionsAndRefresh); |