Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76426 - trunk/boost/asio
From: chris_at_[hidden]
Date: 2012-01-12 02:42:48


Author: chris_kohlhoff
Date: 2012-01-12 02:42:47 EST (Thu, 12 Jan 2012)
New Revision: 76426
URL: http://svn.boost.org/trac/boost/changeset/76426

Log:
Fix regression in buffered_write_stream. Refs #6310.
Text files modified:
   trunk/boost/asio/buffered_write_stream.hpp | 3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)

Modified: trunk/boost/asio/buffered_write_stream.hpp
==============================================================================
--- trunk/boost/asio/buffered_write_stream.hpp (original)
+++ trunk/boost/asio/buffered_write_stream.hpp 2012-01-12 02:42:47 EST (Thu, 12 Jan 2012)
@@ -335,7 +335,8 @@
     std::size_t bytes_avail = boost::asio::buffer_size(buffers);
     std::size_t length = bytes_avail < space_avail ? bytes_avail : space_avail;
     storage_.resize(orig_size + length);
- return boost::asio::buffer_copy(storage_.data(), buffers, length);
+ return boost::asio::buffer_copy(
+ storage_.data() + orig_size, buffers, length);
   }
 
   /// The next layer.


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk