[mem]: Fix the issue with unbranched version of ptr align

This commit is contained in:
flysand7
2024-09-07 18:08:11 +11:00
parent 3a351ec407
commit f8cd13767e

View File

@@ -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)
}
/*