From: Sylvain Bougnoux <bougnoux@imra-europe.com>
Date: Tue, 5 Oct 1999 07:34:27 +0000 (+0000)
Subject: after a seek, reset error if error==EOF
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/fe8aa971c4c66cc68ba6b64c61fae8149477bb5f?ds=sidebyside

after a seek, reset error if error==EOF


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/common/stream.cpp b/src/common/stream.cpp
index 7fdb36e3b8..162dcf19cb 100644
--- a/src/common/stream.cpp
+++ b/src/common/stream.cpp
@@ -593,6 +593,10 @@ wxInputStream& wxInputStream::Read(wxOutputStream& stream_out)
 
 off_t wxInputStream::SeekI(off_t pos, wxSeekMode mode)
 {
+  //should be check and improve, just to remove a slight bug !
+  // I don't know whether it should be put as well in wxFileInputStream::OnSysSeek ?
+  if (m_lasterror==wxSTREAM_EOF) m_lasterror=wxSTREAM_NOERROR;
+
   return OnSysSeek(pos, mode);
 }