summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/kernel/k_page_table.cpp5
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);