From 5378da4085f70f660af233c9e4cd6ce204bea5bb Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 11 Dec 2006 19:50:41 +0000 Subject: Grr. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5934 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_ziplink.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp index 06ad20d35..1166bc60a 100644 --- a/src/modules/extra/m_ziplink.cpp +++ b/src/modules/extra/m_ziplink.cpp @@ -131,12 +131,11 @@ class CountedBuffer : public classbase SI->Log(DEBUG,"Removing first frame from buffer sized %d", amount_expected); unsigned char* temp = buffer; - bufsz -= (amount_expected + 4); buffer = new unsigned char[bufsz + 1]; SI->Log(DEBUG,"Shrunk buffer to %d", bufsz); - memcpy(buffer, temp + amount_expected + 4, bufsz); + memcpy(buffer, temp + amount_expected, bufsz - amount_expected); amount_read -= (amount_expected + 4); SI->Log(DEBUG,"Amount read now %d", amount_read); -- cgit v1.2.3