summaryrefslogtreecommitdiffstats
path: root/decoder.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-06 12:52:00 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-06 12:52:00 +0000
commit9444ef01eb53021af38c1b532a09c00cce53b456 (patch)
treeeee4662f54d31b34a0c1e78bb39209ce73915b2d /decoder.h
parentAdding debian version 1.6-2. (diff)
downloadclzip-9444ef01eb53021af38c1b532a09c00cce53b456.tar.xz
clzip-9444ef01eb53021af38c1b532a09c00cce53b456.zip
Merging upstream version 1.7~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decoder.h')
-rw-r--r--decoder.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/decoder.h b/decoder.h
index 24847dd..19e4c6a 100644
--- a/decoder.h
+++ b/decoder.h
@@ -1,5 +1,5 @@
/* Clzip - LZMA lossless data compressor
- Copyright (C) 2010-2014 Antonio Diaz Diaz.
+ Copyright (C) 2010-2015 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -301,7 +301,7 @@ static inline bool LZd_init( struct LZ_decoder * const d,
d->partial_data_pos = 0;
d->rdec = rde;
d->dictionary_size = dict_size;
- d->buffer_size = max( 65536, dict_size );
+ d->buffer_size = max( 65536U, d->dictionary_size );
d->buffer = (uint8_t *)malloc( d->buffer_size );
if( !d->buffer ) return false;
d->pos = 0;
@@ -319,7 +319,6 @@ static inline bool LZd_init( struct LZ_decoder * const d,
Bm_array_init( d->bm_dis_slot[0], len_states * (1 << dis_slot_bits) );
Bm_array_init( d->bm_dis, modeled_distances - end_dis_model );
Bm_array_init( d->bm_align, dis_align_size );
-
Lm_init( &d->match_len_model );
Lm_init( &d->rep_len_model );
d->buffer[d->buffer_size-1] = 0; /* prev_byte of first byte */