summaryrefslogtreecommitdiffstats
path: root/encoder.c
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 13:49:48 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 13:49:48 +0000
commit432394cea37e7b08ff3712ce6d42d05e39327a5c (patch)
tree111f85b702d000279ef85d2b68d05dfba8315bb7 /encoder.c
parentAdding debian version 1.5~rc1-1. (diff)
downloadlzlib-432394cea37e7b08ff3712ce6d42d05e39327a5c.tar.xz
lzlib-432394cea37e7b08ff3712ce6d42d05e39327a5c.zip
Merging upstream version 1.5.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'encoder.c')
-rw-r--r--encoder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/encoder.c b/encoder.c
index 0408063..f4b75d8 100644
--- a/encoder.c
+++ b/encoder.c
@@ -320,11 +320,11 @@ static void LZe_fill_distance_prices( struct LZ_encoder * const encoder )
const int price =
price_symbol_reversed( encoder->bm_dis + base - dis_slot - 1,
dis - base, direct_bits );
- for( dis_state = 0; dis_state < max_dis_states; ++dis_state )
+ for( dis_state = 0; dis_state < dis_states; ++dis_state )
encoder->dis_prices[dis_state][dis] = price;
}
- for( dis_state = 0; dis_state < max_dis_states; ++dis_state )
+ for( dis_state = 0; dis_state < dis_states; ++dis_state )
{
int * const dsp = encoder->dis_slot_prices[dis_state];
int * const dp = encoder->dis_prices[dis_state];
@@ -361,7 +361,7 @@ static bool LZe_init( struct LZ_encoder * const encoder,
Bm_array_init( encoder->bm_rep1, states );
Bm_array_init( encoder->bm_rep2, states );
Bm_array_init( encoder->bm_len[0], states * pos_states );
- Bm_array_init( encoder->bm_dis_slot[0], max_dis_states * (1 << dis_slot_bits) );
+ Bm_array_init( encoder->bm_dis_slot[0], dis_states * (1 << dis_slot_bits) );
Bm_array_init( encoder->bm_dis, modeled_distances - end_dis_model );
Bm_array_init( encoder->bm_align, dis_align_size );