From c15b71ae0820cbf883c959ae46518d07cbe2728d Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Sun, 28 Aug 2005 15:44:15 +0000
Subject: [PATCH] fixed bug in wxStreamBuffer::Read(wxStreamBuffer *) and
 improved its documentation (patch 1273774 by Paul Cornett)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/changes.txt         | 1 +
 docs/latex/wx/stream.tex | 4 ++--
 src/common/stream.cpp    | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/docs/changes.txt b/docs/changes.txt
index ae373127d7..ae978e38b3 100644
--- a/docs/changes.txt
+++ b/docs/changes.txt
@@ -17,6 +17,7 @@ All:
 - wxABI_VERSION, see 'Backward Compatibility' topic overview in the manual.
 - Added wxLongLong::ToDouble()
 - Added wxDateTime::[Make]FromTimezone(), fixed several TZ-related bugs
+- Fixed bug in wxStreamBuffer::Read(wxStreamBuffer *) (Paul Cornett)
 
 All (GUI):
 
diff --git a/docs/latex/wx/stream.tex b/docs/latex/wx/stream.tex
index a0bd5a64d1..45a146774a 100644
--- a/docs/latex/wx/stream.tex
+++ b/docs/latex/wx/stream.tex
@@ -95,8 +95,8 @@ It returns the size of the data read. If the returned size is different of the s
 
 \func{size\_t}{Read}{\param{wxStreamBuffer *}{buffer}}
 
-Reads a {\it buffer}. The function returns when {\it buffer} is full or when there isn't
-data anymore in the current buffer.
+Copies data to {\it buffer}. The function returns when {\it buffer} is full or when there isn't
+any more data in the current buffer.
 
 \wxheading{See also}
 
diff --git a/src/common/stream.cpp b/src/common/stream.cpp
index 271f7490ae..babad3a110 100644
--- a/src/common/stream.cpp
+++ b/src/common/stream.cpp
@@ -434,7 +434,7 @@ size_t wxStreamBuffer::Read(wxStreamBuffer *dbuf)
 
     do
     {
-        nRead = Read(dbuf, WXSIZEOF(buf));
+        nRead = Read(buf, WXSIZEOF(buf));
         if ( nRead )
         {
             nRead = dbuf->Write(buf, nRead);
-- 
2.50.0

