From 68f146206ff65cfafdf88c154aece854a0ba4864 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 12 Feb 2007 19:08:13 +0000 Subject: [PATCH] fixed LastRead() after Read(wxOutputStream&) (patch 1658301) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/stream.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- 2.45.2