Skip to content

Commit

Permalink
Fix Gzip::Compress::Reader error for gzip files with extra field
Browse files Browse the repository at this point in the history
  • Loading branch information
kojix2 committed May 1, 2024
1 parent 8b9e299 commit 3d227de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compress/gzip/header.cr
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Compress::Gzip::Header
@os = header[9]

if flg.extra?
xlen = io.read_byte.not_nil!
xlen = io.read_bytes(UInt16, IO::ByteFormat::LittleEndian)
@extra = Bytes.new(xlen)
io.read_fully(@extra)
end
Expand Down

0 comments on commit 3d227de

Please sign in to comment.