+ /* 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;
+
+ /* A call to SeekI() will automatically invalidate any previous call
+ to Ungetch(), otherwise it would be possible to SeekI() to one
+ one position, unread some bytes there, SeekI() to another position
+ and the data would be corrupted.
+
+ GRG: Could add code here to try to navigate within the wback
+ buffer if possible, but is it really needed? It would only work
+ when seeking in wxFromCurrent mode, else it would invalidate
+ anyway...
+ */
+ if (m_wback)
+ {
+ free(m_wback);
+ m_wback = (char*) NULL;
+ m_wbacksize = 0;
+ m_wbackcur = 0;
+ }
+
+ return OnSysSeek(pos, mode);