Thrift: TMemoryBuffer::getAppendBufferToString fix.
authorDavid Reiss <dreiss@apache.org>
Fri, 24 Aug 2007 00:19:12 +0000 (00:19 +0000)
committerDavid Reiss <dreiss@apache.org>
Fri, 24 Aug 2007 00:19:12 +0000 (00:19 +0000)
Summary:
Same fix as getBufferAsString

Blame Rev: 55988

Reviewed By: dreiss

Test Plan: Thrift compiles.

Revert Plan: ok

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665222 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/transport/TTransportUtils.h

index 518969f..1a40975 100644 (file)
@@ -326,7 +326,7 @@ class TMemoryBuffer : public TTransport {
     if (buffer_ == NULL) {
       return;
     }
-    str.append((char*)buffer_, bufferSize_);
+    str.append((char*)buffer_, wPos_);
   }
 
   void resetBuffer() {