From a41c8705db8f09227e22c04bbb98ca046c819ca9 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Thu, 23 Aug 2007 17:20:38 +0000 Subject: [PATCH] Thrift: TMemoryBuffer::getBufferAsString only returns written portion. (This change was by Adam, diff sent by email, I'm just checking it in.) Blame Rev: 55988 Reviewed By: adam Test Plan: Thrift compiles. Revert Plan: ok git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665219 13f79535-47bb-0310-9956-ffa450edef68 --- lib/cpp/src/transport/TTransportUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cpp/src/transport/TTransportUtils.h b/lib/cpp/src/transport/TTransportUtils.h index 9499acd1..518969fa 100644 --- a/lib/cpp/src/transport/TTransportUtils.h +++ b/lib/cpp/src/transport/TTransportUtils.h @@ -319,7 +319,7 @@ class TMemoryBuffer : public TTransport { if (buffer_ == NULL) { return ""; } - return std::string((char*)buffer_, (std::string::size_type)bufferSize_); + return std::string((char*)buffer_, (std::string::size_type)wPos_); } void appendBufferToString(std::string& str) { -- 2.17.1