1
0
Fork 0

Adding upstream version 1.13~rc2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-21 10:12:24 +01:00
parent 89ca1f7591
commit 7fe0f13dd3
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
17 changed files with 679 additions and 132 deletions

View file

@ -108,9 +108,14 @@ void LZ_decoder::flush_data()
if( size > 0 )
{
crc32.update( crc_, buffer + stream_pos, size );
if( outfd >= 0 &&
writeblock( outfd, buffer + stream_pos, size ) != size )
throw Error( "Write error" );
if( outfd >= 0 )
{
const long long i = std::max( 0LL, outskip - stream_position() );
const long long s =
std::min( outend - stream_position(), (long long)size ) - i;
if( s > 0 && writeblock( outfd, buffer + stream_pos + i, s ) != s )
throw Error( "Write error" );
}
if( pos >= buffer_size ) { partial_data_pos += pos; pos = 0; }
stream_pos = pos;
}