From f8cd13767e360092fb4b7df02508f2884cf82da5 Mon Sep 17 00:00:00 2001 From: flysand7 Date: Sat, 7 Sep 2024 18:08:11 +1100 Subject: [PATCH] [mem]: Fix the issue with unbranched version of ptr align --- core/mem/mem.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mem/mem.odin b/core/mem/mem.odin index c17ab43a9..2212ee171 100644 --- a/core/mem/mem.odin +++ b/core/mem/mem.odin @@ -468,7 +468,7 @@ The specified alignment must be a power of 2. @(require_results) align_forward_uintptr :: proc(ptr, align: uintptr) -> uintptr { assert(is_power_of_two(align)) - return (p + align-1) & ~(align-1) + return (ptr + align-1) & ~(align-1) } /*