fix RageFileObjInflate not always flushing the end of files properly
This commit is contained in:
@@ -105,8 +105,6 @@ int RageFileObjInflate::ReadInternal( void *buf, size_t bytes )
|
||||
SetError( m_pFile->GetError() );
|
||||
return -1;
|
||||
}
|
||||
if( got == 0 )
|
||||
break;
|
||||
|
||||
decomp_buf_avail = got;
|
||||
}
|
||||
@@ -126,6 +124,9 @@ int RageFileObjInflate::ReadInternal( void *buf, size_t bytes )
|
||||
case Z_MEM_ERROR:
|
||||
SetError( "out of memory" );
|
||||
return -1;
|
||||
case Z_BUF_ERROR:
|
||||
SetError( "file truncated" );
|
||||
return -1;
|
||||
case Z_STREAM_END:
|
||||
done = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user