From 08cfee54fa96659676efd1bb7d762d9e9ff324e5 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 1 Dec 2020 06:55:50 -0800 Subject: [PATCH] kern: fix re-order/assert in KMemoryBlock --- .../libmesosphere/include/mesosphere/kern_k_memory_block.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_memory_block.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_memory_block.hpp index 18e030681..14e233d35 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_memory_block.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_memory_block.hpp @@ -353,7 +353,7 @@ namespace ams::kern { } constexpr KMemoryBlock(KProcessAddress addr, size_t np, KMemoryState ms, KMemoryPermission p, KMemoryAttribute attr) - : device_disable_merge_left_count(), device_disable_merge_right_count(), address(addr), num_pages(np), memory_state(ms), ipc_lock_count(0), device_use_count(0), perm(p), ipc_disable_merge_count(), original_perm(KMemoryPermission_None), attribute(attr), disable_merge_attribute() + : device_disable_merge_left_count(), device_disable_merge_right_count(), address(addr), num_pages(np), memory_state(ms), ipc_lock_count(0), device_use_count(0), ipc_disable_merge_count(), perm(p), original_perm(KMemoryPermission_None), attribute(attr), disable_merge_attribute() { /* ... */ } @@ -460,7 +460,7 @@ namespace ams::kern { if (left) { this->disable_merge_attribute = static_cast(this->disable_merge_attribute | KMemoryBlockDisableMergeAttribute_DeviceLeft); const u16 new_device_disable_merge_left_count = ++this->device_disable_merge_left_count; - MESOSPHERE_ABORT_UNLESS(device_disable_merge_left_count > 0); + MESOSPHERE_ABORT_UNLESS(new_device_disable_merge_left_count > 0); } }