diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:52:02 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:52:02 +0000 |
commit | 92e8b56a5e12ea97fa2763f34c246ca467128b97 (patch) | |
tree | 143179fb3ede09c4aa3fd48c5dc5fc25ce21d138 /main.cc | |
parent | Adding debian version 1.17~rc2-1. (diff) | |
download | lziprecover-92e8b56a5e12ea97fa2763f34c246ca467128b97.tar.xz lziprecover-92e8b56a5e12ea97fa2763f34c246ca467128b97.zip |
Merging upstream version 1.17.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | main.cc | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -145,7 +145,7 @@ void show_version() } // end namespace -void show_header( const File_header & header ) +void show_header( const unsigned dictionary_size ) { if( verbosity >= 3 ) { @@ -154,7 +154,7 @@ void show_header( const File_header & header ) enum { factor = 1024 }; const char * p = ""; const char * np = " "; - unsigned num = header.dictionary_size(); + unsigned num = dictionary_size; bool exact = ( num % factor == 0 ); for( int i = 0; i < 8 && ( num > 9999 || ( exact && num >= factor ) ); ++i ) @@ -488,12 +488,13 @@ int decompress( const int infd, const Pretty_print & pp, const bool testing ) header.version() ); } retval = 2; break; } - if( header.dictionary_size() < min_dictionary_size || - header.dictionary_size() > max_dictionary_size ) + const unsigned dictionary_size = header.dictionary_size(); + if( dictionary_size < min_dictionary_size || + dictionary_size > max_dictionary_size ) { pp( "Invalid dictionary size in member header." ); retval = 2; break; } if( verbosity >= 2 || ( verbosity == 1 && first_member ) ) - { pp(); show_header( header ); } + { pp(); show_header( dictionary_size ); } LZ_decoder decoder( header, rdec, outfd ); const int result = decoder.decode_member( pp ); |