fixed LastRead() after Read(wxOutputStream&) (patch 1658301) [backport from HEAD]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-02-12 19:11:12 +00:00
parent 5a802ba35e
commit 42c680d04a

View 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;
}