X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ac8158ad90d6e4d88d1761f9d7807c70e5414d8..299fcbfe98fce39cdc9ab142b65824a175542ff2:/src/common/stream.cpp diff --git a/src/common/stream.cpp b/src/common/stream.cpp index 5c508e98a2..ebe0c5aa11 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -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; }