summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-01-15 08:26:04 +0100
committerbunnei <bunneidev@gmail.com>2022-01-23 05:51:34 +0100
commitffcaf5af9019eb73a5d31b17e56521c49a82dffd (patch)
tree41a15bb84bc8bdc9fc2904a8d7f23acb3c39978b /src/core
parentcore: hle: kernel: KPageTable: Assert valid address on GetPhysicalAddr. (diff)
downloadyuzu-ffcaf5af9019eb73a5d31b17e56521c49a82dffd.tar
yuzu-ffcaf5af9019eb73a5d31b17e56521c49a82dffd.tar.gz
yuzu-ffcaf5af9019eb73a5d31b17e56521c49a82dffd.tar.bz2
yuzu-ffcaf5af9019eb73a5d31b17e56521c49a82dffd.tar.lz
yuzu-ffcaf5af9019eb73a5d31b17e56521c49a82dffd.tar.xz
yuzu-ffcaf5af9019eb73a5d31b17e56521c49a82dffd.tar.zst
yuzu-ffcaf5af9019eb73a5d31b17e56521c49a82dffd.zip
Diffstat (limited to 'src/core')
-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
AttributeTestMask, KMemoryAttribute::None, ~AttributeTestMask));
// Determine the new attribute.
- const auto new_attr = ((old_attr & static_cast<KMemoryAttribute>(~mask)) |
- static_cast<KMemoryAttribute>(attr & mask));
+ const KMemoryAttribute new_attr =
+ static_cast<KMemoryAttribute>(((old_attr & static_cast<KMemoryAttribute>(~mask)) |
+ static_cast<KMemoryAttribute>(attr & mask)));
// Perform operation.
this->Operate(addr, num_pages, old_perm, OperationType::ChangePermissionsAndRefresh);