From d46fe337c105de5449f5b9bb3c1fef7e9cd4643c Mon Sep 17 00:00:00 2001 From: Starnakin Date: Fri, 28 Nov 2025 19:25:16 +0100 Subject: [PATCH] fix: GET_PTE cast type --- headers/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers/memory.h b/headers/memory.h index 6fd2af7..5a4686d 100644 --- a/headers/memory.h +++ b/headers/memory.h @@ -29,7 +29,7 @@ #define PDE_MULTIBOOT 1020 #define GET_PTE(pd_index, pt_index) \ - ((uint32_t *)(VIRT_PT_BASE + pd_index * 4096 + pt_index)) + ((uint32_t *)(VIRT_PT_BASE + ((uint32_t) pd_index) * 4096 + ((uint32_t) pt_index) * 4)) #define PTE2VA(pd_index, pt_index) \ ((uint32_t *)((((uint32_t)pd_index * 1024) + (uint32_t)pt_index) * \