From 3e1f57f67cb15fb88571715e119efc20dc70fda0 Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Tue, 3 Mar 2026 08:51:22 +0100 Subject: [PATCH] Improve type safety of physical page boundaries initialization --- xtoskrnl/mm/pfn.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xtoskrnl/mm/pfn.cc b/xtoskrnl/mm/pfn.cc index e88ee22..be4cdc3 100644 --- a/xtoskrnl/mm/pfn.cc +++ b/xtoskrnl/mm/pfn.cc @@ -1146,9 +1146,9 @@ MM::Pfn::ScanMemoryDescriptors(VOID) PLOADER_MEMORY_DESCRIPTOR MemoryDescriptor; PFN_NUMBER FreePages; - /* Initialize the lowest and highest physical page numbers */ - LowestPhysicalPage = ~0; - HighestPhysicalPage = 0; + /* Initialize the highest and lowest physical page numbers */ + HighestPhysicalPage = (ULONG_PTR)0; + LowestPhysicalPage = (ULONG_PTR)~0; /* Initially, set number of free pages to 0 */ FreePages = 0;