summaryrefslogtreecommitdiffstats
path: root/decoder.c
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:00:38 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:00:38 +0000
commitc14d1693bdd22c33c4cf48acb77cf51b1769dc77 (patch)
treec6fd25510d2ff466252686512f69d8ca9ba155c8 /decoder.c
parentAdding debian version 1.5-1. (diff)
downloadlzlib-c14d1693bdd22c33c4cf48acb77cf51b1769dc77.tar.xz
lzlib-c14d1693bdd22c33c4cf48acb77cf51b1769dc77.zip
Merging upstream version 1.6~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decoder.c')
-rw-r--r--decoder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/decoder.c b/decoder.c
index 34850bc..e1b4c1d 100644
--- a/decoder.c
+++ b/decoder.c
@@ -86,9 +86,9 @@ static int LZd_decode_member( struct LZ_decoder * const decoder )
else
{
int len;
- if( Rd_decode_bit( rdec, &decoder->bm_rep[*state] ) == 1 ) /* 2nd bit */
+ if( Rd_decode_bit( rdec, &decoder->bm_rep[*state] ) != 0 ) /* 2nd bit */
{
- if( Rd_decode_bit( rdec, &decoder->bm_rep0[*state] ) == 1 ) /* 3rd bit */
+ if( Rd_decode_bit( rdec, &decoder->bm_rep0[*state] ) != 0 ) /* 3rd bit */
{
unsigned distance;
if( Rd_decode_bit( rdec, &decoder->bm_rep1[*state] ) == 0 ) /* 4th bit */
@@ -118,7 +118,7 @@ static int LZd_decode_member( struct LZ_decoder * const decoder )
int dis_slot;
const unsigned rep0_saved = decoder->rep0;
len = min_match_len + Rd_decode_len( rdec, &decoder->match_len_model, pos_state );
- dis_slot = Rd_decode_tree6( rdec, decoder->bm_dis_slot[get_dis_state(len)] );
+ dis_slot = Rd_decode_tree6( rdec, decoder->bm_dis_slot[get_len_state(len)] );
if( dis_slot < start_dis_model ) decoder->rep0 = dis_slot;
else
{