Commit 815022c87b

Krzysztof Wolicki <der.teufel.mail@gmail.com>
2024-07-07 12:16:14
std.coff: fix setAlignment
1 parent 64e84a4
Changed files (1)
lib
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 {