]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed LastRead() after Read(wxOutputStream&) (patch 1658301)
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Feb 2007 19:08:13 +0000 (19:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Feb 2007 19:08:13 +0000 (19:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/stream.cpp

index 8ae48e1605d3f02aaf1af5efd3f27d1ba890060a..4765ea03f60351289947ce3699e34eda8ec7fb5a 100644 (file)
@@ -869,6 +869,7 @@ char wxInputStream::Peek()
 
 wxInputStream& wxInputStream::Read(wxOutputStream& stream_out)
 {
+    size_t lastcount = 0;
     char buf[BUF_TEMP_SIZE];
 
     for ( ;; )
@@ -879,8 +880,12 @@ wxInputStream& wxInputStream::Read(wxOutputStream& stream_out)
 
         if ( stream_out.Write(buf, bytes_read).LastWrite() != bytes_read )
             break;
+
+        lastcount += bytes_read;
     }
 
+    m_lastcount = lastcount;
+
     return *this;
 }