summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_ziplink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra/m_ziplink.cpp')
-rw-r--r--src/modules/extra/m_ziplink.cpp3
1 files changed, 1 insertions, 2 deletions
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);