summaryrefslogtreecommitdiffstats
path: root/decoder.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:09:39 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:09:39 +0000
commite0f3176a18dc8b14ca249e80f84bc0c36b1d5579 (patch)
treeca01d00df2874401078a37d493dfdf587ad9c514 /decoder.cc
parentAdding debian version 1.17-1. (diff)
downloadlzip-e0f3176a18dc8b14ca249e80f84bc0c36b1d5579.tar.xz
lzip-e0f3176a18dc8b14ca249e80f84bc0c36b1d5579.zip
Merging upstream version 1.18~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decoder.cc')
-rw-r--r--decoder.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/decoder.cc b/decoder.cc
index 113479a..f773e57 100644
--- a/decoder.cc
+++ b/decoder.cc
@@ -42,7 +42,7 @@ void Pretty_print::operator()( const char * const msg ) const
{
first_post = false;
std::fprintf( stderr, " %s: ", name_.c_str() );
- for( unsigned i = 0; i < longest_name - name_.size(); ++i )
+ for( unsigned i = name_.size(); i < longest_name; ++i )
std::fputc( ' ', stderr );
if( !msg ) std::fflush( stderr );
}
@@ -110,7 +110,7 @@ void LZ_decoder::flush_data()
crc32.update_buf( crc_, buffer + stream_pos, size );
if( outfd >= 0 && writeblock( outfd, buffer + stream_pos, size ) != size )
throw Error( "Write error" );
- if( pos >= buffer_size ) { partial_data_pos += pos; pos = 0; }
+ if( pos >= dictionary_size ) { partial_data_pos += pos; pos = 0; }
stream_pos = pos;
}
}