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;