From 41521eeb2e0dc57c8dacf481e20d98b1002ac0cb Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 23 Feb 2007 09:53:01 +0000 Subject: [PATCH] reenable RageFileObjInflate::Copy. 3+ years is long enough to give people to upgrade zlib ... --- stepmania/src/RageFileDriverDeflate.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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 ); }