X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Flzx-compress.c;h=5246e1a1ed3b7add7f7c543c0a240177c3c1218e;hp=ba3b10aa1e7402bf62e2f4506591ce49590cbad7;hb=6d0470be4d1855a0ea254e788e9ced23fc36dfb7;hpb=3adc1ac1ebe221427857d8f6fd06cfb823b4bea6 diff --git a/src/lzx-compress.c b/src/lzx-compress.c index ba3b10aa..5246e1a1 100644 --- a/src/lzx-compress.c +++ b/src/lzx-compress.c @@ -456,9 +456,6 @@ lzx_write_match(struct output_bitstream *out, int block_type, * MIN_MATCH_LEN. */ if (match_len_minus_2 < LZX_NUM_PRIMARY_LENS) { len_header = match_len_minus_2; - /* No length footer-- mark it with a special - * value. */ - len_footer = (unsigned)(-1); } else { len_header = LZX_NUM_PRIMARY_LENS; len_footer = match_len_minus_2 - LZX_NUM_PRIMARY_LENS; @@ -478,10 +475,9 @@ lzx_write_match(struct output_bitstream *out, int block_type, /* If there is a length footer, output it using the * length Huffman code. */ - if (len_footer != (unsigned)(-1)) { + if (len_header == LZX_NUM_PRIMARY_LENS) bitstream_put_bits(out, codes->codewords.len[len_footer], codes->lens.len[len_footer]); - } num_extra_bits = lzx_get_num_extra_bits(position_slot);