commit f986cb1f90ff36f65404cb5d62baf9a5a03ce5cd (tree)
parent 2f11de4f514d9775c7713313f2dcfa7343cd2bf2
Author: zooster <r00ster91@proton.me>
Date: Mon, 28 Nov 2022 17:46:16 +0100
std.Thread.Futex.PosixImpl.Address.from: fix `alignment` type
Fixes #13673
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/std/Thread/Futex.zig b/lib/std/Thread/Futex.zig
@@ -721,7 +721,7 @@ const PosixImpl = struct {
// then cut off the zero bits from the alignment to get the unique address.
const addr = @ptrToInt(ptr);
assert(addr & (alignment - 1) == 0);
- return addr >> @ctz(alignment);
+ return addr >> @ctz(@as(usize, alignment));
}
};