summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/package.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-07-05 01:57:27 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-07-05 02:23:41 +0200
commit3ba445871afb05180862712e32c4c979dc6db786 (patch)
treec67706f0fe07a55414d3361993cf6495bfbefef6 /crawl-ref/source/package.cc
parente4066ccd619b59a64c6fc9643a478fa7ef72f600 (diff)
downloadcrawl-ref-3ba445871afb05180862712e32c4c979dc6db786.tar.gz
crawl-ref-3ba445871afb05180862712e32c4c979dc6db786.zip
Fix zlib compression done in chunks of only 4 bytes.
This worked correctly, but inefficiently.
Diffstat (limited to 'crawl-ref/source/package.cc')
-rw-r--r--crawl-ref/source/package.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/package.cc b/crawl-ref/source/package.cc
index e105f1bf98..6bd56fe0a7 100644
--- a/crawl-ref/source/package.cc
+++ b/crawl-ref/source/package.cc
@@ -683,7 +683,7 @@ chunk_writer::~chunk_writer()
fail("save file compression failed: %s", zs.msg);
raw_write(z_buffer, zs.next_out - z_buffer);
zs.next_out = z_buffer;
- zs.avail_out = sizeof(ZB_SIZE);
+ zs.avail_out = ZB_SIZE;
} while (res != Z_STREAM_END);
if (deflateEnd(&zs) != Z_OK)
fail("save file compression failed during clean-up: %s", zs.msg);