commit 815022c87b34bae92d98475685425063ca36cbf7 (tree)
parent 64e84a452b043599e96e1e6af895b9959628f1fe
Author: Krzysztof Wolicki <der.teufel.mail@gmail.com>
Date: Sun, 7 Jul 2024 12:16:14 +0200
std.coff: fix setAlignment
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/std/coff.zig b/lib/std/coff.zig
@@ -542,7 +542,7 @@ pub const SectionHeader = extern struct {
pub fn setAlignment(self: *SectionHeader, new_alignment: u16) void {
assert(new_alignment > 0 and new_alignment <= 8192);
- self.flags.ALIGN = std.math.log2(new_alignment);
+ self.flags.ALIGN = @intCast(std.math.log2(new_alignment));
}
pub fn isCode(self: SectionHeader) bool {