src/proto2/NetworkTCP.cc
branchno-netsession
changeset 39 cfb8b6e2a35f
parent 38 4189b8bf3a5b
--- a/src/proto2/NetworkTCP.cc	Thu Nov 20 22:10:28 2008 +0000
+++ b/src/proto2/NetworkTCP.cc	Thu Nov 20 22:55:28 2008 +0000
@@ -139,7 +139,8 @@
     
     // copy the data over, unless it's too large
     if (prefix <= buf_max) {
-        memcpy(buf_ptr, buf, prefix);
+        // ...don't copy the prefix, though
+        memcpy(buf_ptr, buf + sizeof(PrefixType), prefix);
     
         // trim the bytes out
         trim(sizeof(PrefixType) + prefix);