]> granicus.if.org Git - xz/commitdiff
Initialize align_price_count and match_price_count in
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 10 Mar 2008 11:46:48 +0000 (13:46 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 10 Mar 2008 11:46:48 +0000 (13:46 +0200)
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.

src/liblzma/lzma/lzma_encoder_init.c

index dc66977ad37f1e9ddcd6e098f66e1440ccf6442e..d5dd9e7b587c5b7671b7985deec7a563361ac8cf 100644 (file)
@@ -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;