diff options
| author | gingerBill <bill@gingerbill.org> | 2023-09-30 20:26:04 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-09-30 20:26:04 +0100 |
| commit | 5023313c031d2d2e587dc1e30b4982e7784061c2 (patch) | |
| tree | 2ce225d27db249cdb7a6061a388ef09072a3a6ee /core/compress/gzip | |
| parent | 3e0fd6368225ddfa6820be72d194b7cd1daf52dc (diff) | |
Minor cleanups to the core library
Diffstat (limited to 'core/compress/gzip')
| -rw-r--r-- | core/compress/gzip/gzip.odin | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/compress/gzip/gzip.odin b/core/compress/gzip/gzip.odin index b0ca4491b..50945fc77 100644 --- a/core/compress/gzip/gzip.odin +++ b/core/compress/gzip/gzip.odin @@ -335,10 +335,8 @@ load_from_context :: proc(z: ^$C, buf: ^bytes.Buffer, known_gzip_size := -1, exp // fmt.printf("GZIP: Expected Payload Size: %v\n", expected_output_size); - zlib_error := zlib.inflate_raw(z, expected_output_size=expected_output_size) - if zlib_error != nil { - return zlib_error - } + zlib.inflate_raw(z, expected_output_size=expected_output_size) or_return + /* Read CRC32 using the ctx bit reader because zlib may leave bytes in there. */ |