diff --git a/lib/std/coff.zig b/lib/std/coff.zig index f9de318e7a..a6d95735cd 100644 --- a/lib/std/coff.zig +++ b/lib/std/coff.zig @@ -831,7 +831,7 @@ pub const Coff = struct { var stream = std.io.fixedBufferStream(self.data); const reader = stream.reader(); try stream.seekTo(pe_pointer_offset); - const coff_header_offset = try reader.readByte(); + const coff_header_offset = try reader.readIntLittle(u32); try stream.seekTo(coff_header_offset); var buf: [4]u8 = undefined; try reader.readNoEof(&buf);