diff --git a/stepmania/src/RageFileDriverDeflate.cpp b/stepmania/src/RageFileDriverDeflate.cpp index 2421f05bd3..83f96525f0 100644 --- a/stepmania/src/RageFileDriverDeflate.cpp +++ b/stepmania/src/RageFileDriverDeflate.cpp @@ -48,26 +48,21 @@ RageFileObjInflate::RageFileObjInflate( const RageFileObjInflate &cpy ): { /* XXX completely untested */ /* Copy the entire decode state. */ - /* inflateInit2 isn't widespread yet */ - ASSERT( 0 ); -/* m_pFile = cpy.m_pFile->Copy(); m_bFileOwned = true; m_pInflate = new z_stream; + m_iUncompressedSize = cpy.m_iUncompressedSize; + m_iFilePos = cpy.m_iFilePos; inflateCopy( m_pInflate, const_cast(cpy.m_pInflate) ); - // memcpy decomp_buf? decomp_buf_ptr = decomp_buf + (cpy.decomp_buf_ptr - cpy.decomp_buf); decomp_buf_avail = cpy.decomp_buf_avail; - m_iFilePos = cpy.m_iFilePos; - */ + memcpy( decomp_buf, cpy.decomp_buf, decomp_buf_avail ); } RageFileObjInflate *RageFileObjInflate::Copy() const { - RageException::Throw( "Loading ZIPs from deflated ZIPs is currently disabled; see RageFileObjInflate." ); - - // return new RageFileObjInflate( *this, p ); + return new RageFileObjInflate( *this ); }