Commit 9177e0da4f

Yusuf Bham <ybham6@gmail.com>
2023-01-28 03:40:23
std.os.uefi: fix shift in pool allocator
1 parent fcb05ee
Changed files (1)
lib
std
lib/std/os/uefi/pool_allocator.zig
@@ -22,7 +22,7 @@ const UefiPoolAllocator = struct {
 
         assert(len > 0);
 
-        const ptr_align = 1 << log2_ptr_align;
+        const ptr_align = @as(usize, 1) << @as(Allocator.Log2Align, log2_ptr_align);
 
         const metadata_len = mem.alignForward(@sizeOf(usize), ptr_align);