]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed small bug related to m_lastcount in wxInputStream::Read
authorGuillermo Rodriguez Garcia <guille@iies.es>
Thu, 9 Dec 1999 13:41:52 +0000 (13:41 +0000)
committerGuillermo Rodriguez Garcia <guille@iies.es>
Thu, 9 Dec 1999 13:41:52 +0000 (13:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/stream.cpp

index 5c508e98a23893b4e9a94842a9e37f93a69865d8..ebe0c5aa1112437b01715f92ce0e7577082d1384 100644 (file)
@@ -585,11 +585,10 @@ wxInputStream& wxInputStream::Read(void *buffer, size_t size)
     m_lasterror = wxStream_NOERROR;
     return *this;
   }
-  size     -= retsize;
-  buf      += retsize;
+  size -= retsize;
+  buf  += retsize;
 
-  // GRG: shouldn't we also add retsize to m_lastcount here?
-  m_lastcount = OnSysRead(buf, size);
+  m_lastcount = OnSysRead(buf, size) + retsize;
   return *this;
 }