aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lzma/lzma_encoder_init.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-03-10 13:46:48 +0200
committerLasse Collin <lasse.collin@tukaani.org>2008-03-10 13:46:48 +0200
commit0541c5ea63ef3c0ff85eeddb0a420e56b0c65258 (patch)
tree396a02486ec26c091953514a05067013c72958be /src/liblzma/lzma/lzma_encoder_init.c
parentAlways initialize lz->temp_size in lz_decoder.c. temp_size did (diff)
downloadxz-0541c5ea63ef3c0ff85eeddb0a420e56b0c65258.tar.xz
Initialize align_price_count and match_price_count in
lzma_encoder_init.c. While we don't call fill_distances_prices() and fill_align_prices() in lzma_lzma_encoder_init(), we still need to initialize these two variables so that the fill functions get called in lzma_encoder_getoptimum.c in the beginning of a stream.
Diffstat (limited to 'src/liblzma/lzma/lzma_encoder_init.c')
-rw-r--r--src/liblzma/lzma/lzma_encoder_init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liblzma/lzma/lzma_encoder_init.c b/src/liblzma/lzma/lzma_encoder_init.c
index dc66977a..d5dd9e7b 100644
--- a/src/liblzma/lzma/lzma_encoder_init.c
+++ b/src/liblzma/lzma/lzma_encoder_init.c
@@ -136,6 +136,8 @@ lzma_lzma_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
// Misc FIXME desc
+ next->coder->align_price_count = 0;
+ next->coder->match_price_count = 0;
next->coder->dictionary_size = options->dictionary_size;
next->coder->pos_mask = (1U << options->pos_bits) - 1;
next->coder->fast_bytes = options->fast_bytes;