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) * \