X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ea48c514e0b911113020c76fdb83b64f5941ddb..ce457f1245754243f17b4efde9ec773a8b3c3067:/src/common/stream.cpp diff --git a/src/common/stream.cpp b/src/common/stream.cpp index 8ae48e1605..4765ea03f6 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -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; }