]> git.saurik.com Git - wxWidgets.git/commitdiff
~wxBufferedStream puts back unread bytes
authorSylvain Bougnoux <bougnoux@imra-europe.com>
Tue, 14 Dec 1999 14:37:24 +0000 (14:37 +0000)
committerSylvain Bougnoux <bougnoux@imra-europe.com>
Tue, 14 Dec 1999 14:37:24 +0000 (14:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/stream.cpp

index 6d3b4edcd5b326bfe3eb10cecd55b30d8c225041..2c105915173bbd6ce9a37d7aabbb1b4450b07f83 100644 (file)
@@ -803,6 +803,9 @@ wxBufferedInputStream::wxBufferedInputStream(wxInputStream& s)
 
 wxBufferedInputStream::~wxBufferedInputStream()
 {
+  off_t unused_bytes=m_i_streambuf->GetBufferPos()-m_i_streambuf->GetBufferEnd();
+  m_parent_i_stream->SeekI(unused_bytes,wxFromCurrent);
+
   delete m_i_streambuf;
 }