From dbbb29bb058ddf2dd67e17902c42f536b94d5e9c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 22 Nov 2005 21:08:39 +0000 Subject: [PATCH] fix RageFileObjInflate not always flushing the end of files properly --- stepmania/src/RageFileDriverDeflate.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageFileDriverDeflate.cpp b/stepmania/src/RageFileDriverDeflate.cpp index 617ef42321..c59ae5c67d 100644 --- a/stepmania/src/RageFileDriverDeflate.cpp +++ b/stepmania/src/RageFileDriverDeflate.cpp @@ -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;