fix RageFileObjInflate not always flushing the end of files properly

This commit is contained in:
Glenn Maynard
2005-11-22 21:08:39 +00:00
parent 492791d56f
commit dbbb29bb05
+3 -2
View File
@@ -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;