X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b9138710628d19def429350e4eadd8ac99504efa..7124df9b59f2627c083b1fecaaa3e93c7088e3d0:/src/common/stream.cpp diff --git a/src/common/stream.cpp b/src/common/stream.cpp index 1e2dc7e457..189916814b 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -81,6 +81,8 @@ void wxStreamBuffer::Init() wxStreamBuffer::wxStreamBuffer(wxStreamBase& stream, BufMode mode) { + Init(); + m_stream = &stream; m_mode = mode; @@ -90,6 +92,8 @@ wxStreamBuffer::wxStreamBuffer(wxStreamBase& stream, BufMode mode) wxStreamBuffer::wxStreamBuffer(BufMode mode) { + Init(); + m_stream = new wxStreamBase; m_mode = mode; @@ -1020,7 +1024,8 @@ wxBufferedInputStream::wxBufferedInputStream(wxInputStream& s, wxBufferedInputStream::~wxBufferedInputStream() { - m_parent_i_stream->SeekI(-m_i_streambuf->GetBytesLeft(), wxFromCurrent); + m_parent_i_stream->SeekI(-(off_t)m_i_streambuf->GetBytesLeft(), + wxFromCurrent); delete m_i_streambuf; }