]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/stream.cpp
applied patch 1683441
[wxWidgets.git] / 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;
 }