summaryrefslogtreecommitdiffstats
path: root/encoder.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 );