diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-06 11:28:53 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-06 11:28:53 +0000 |
commit | a3629922528ef8b10b664add82a8d5a1d26712b1 (patch) | |
tree | f7a142116cac25055205729fbf1c17f76066b351 /decoder.c | |
parent | Adding upstream version 1.0~rc3. (diff) | |
download | clzip-a3629922528ef8b10b664add82a8d5a1d26712b1.tar.xz clzip-a3629922528ef8b10b664add82a8d5a1d26712b1.zip |
Adding upstream version 1.0.upstream/1.0
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decoder.c')
-rw-r--r-- | decoder.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -63,7 +63,7 @@ bool LZd_verify_trailer( struct LZ_decoder * const decoder, struct Pretty_print * const pp ) { File_trailer trailer; - const int trailer_size = Ft_versioned_size( decoder->format_version ); + const int trailer_size = Ft_versioned_size( decoder->member_version ); const long long member_size = LZd_member_position( decoder ) + trailer_size; bool error = false; @@ -83,7 +83,7 @@ bool LZd_verify_trailer( struct LZ_decoder * const decoder, for( ; i < trailer_size; ++i ) trailer[i] = 0; } } - if( decoder->format_version == 0 ) Ft_set_member_size( trailer, member_size ); + if( decoder->member_version == 0 ) Ft_set_member_size( trailer, member_size ); if( !Rd_code_is_zero( decoder->range_decoder ) ) { error = true; @@ -153,10 +153,11 @@ int LZd_decode_member( struct LZ_decoder * const decoder, { const uint8_t prev_byte = LZd_get_byte( decoder, 0 ); if( St_is_char( state ) ) - LZd_put_byte( decoder, Lid_decode( &decoder->literal_decoder, decoder->range_decoder, prev_byte ) ); + LZd_put_byte( decoder, Lid_decode( &decoder->literal_decoder, + decoder->range_decoder, prev_byte ) ); else - LZd_put_byte( decoder, Lid_decode_matched( &decoder->literal_decoder, decoder->range_decoder, prev_byte, - LZd_get_byte( decoder, rep0 ) ) ); + LZd_put_byte( decoder, Lid_decode_matched( &decoder->literal_decoder, + decoder->range_decoder, prev_byte, LZd_get_byte( decoder, rep0 ) ) ); St_set_char( &state ); } else |