summaryrefslogtreecommitdiffstats
path: root/LzmaEnc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--LzmaEnc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/LzmaEnc.c b/LzmaEnc.c
index 235b07e..dfba154 100644
--- a/LzmaEnc.c
+++ b/LzmaEnc.c
@@ -1574,15 +1574,15 @@ static void LZe_full_flush(CLzmaEnc *p, UInt32 posState)
RangeEnc_FlushData(&p->rc);
RangeEnc_FlushStream(&p->rc);
File_trailer trailer;
- Ft_set_data_crc( trailer, p->matchFinderBase.crc ^ 0xFFFFFFFF );
+ Ft_set_data_crc( trailer, p->matchFinderBase.crc ^ 0xFFFFFFFFU );
Ft_set_data_size( trailer, p->nowPos64 );
- Ft_set_member_size( trailer, p->rc.processed + sizeof (File_header) + sizeof (File_trailer) );
- if( p->rc.outStream->Write( p->rc.outStream, trailer, sizeof (File_trailer)) != sizeof (File_trailer))
+ Ft_set_member_size( trailer, p->rc.processed + Fh_size + Ft_size );
+ if( p->rc.outStream->Write( p->rc.outStream, trailer, Ft_size ) != Ft_size )
p->rc.res = SZ_ERROR_WRITE;
if( verbosity >= 1 )
{
long long in_size = p->nowPos64;
- long long out_size = p->rc.processed + sizeof (File_header) + sizeof (File_trailer);
+ long long out_size = p->rc.processed + Fh_size + Ft_size;
if( in_size <= 0 || out_size <= 0 )
fprintf( stderr, "no data compressed.\n" );
else