diff --git a/lib/std/coff.zig b/lib/std/coff.zig index 1461ac7fbcfa9c7a9885a1a85eb64fff31a9caa0..211b1a181938d1d51c75b3b57dbf9b66387f04ba 100644 --- 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 {