size_t int_diff = wx_truncate_cast(size_t, diff);
wxCHECK_MSG( (wxFileOffset)int_diff == diff, wxInvalidOffset, wxT("huge file not supported") );
SetIntPosition(int_diff);
- return pos;
+ return diff;
}
case wxFromEnd:
bytes_read = Read(buf, WXSIZEOF(buf)).LastRead();
if ( m_lasterror != wxSTREAM_NO_ERROR )
return wxInvalidOffset;
-
+
wxASSERT(bytes_read == WXSIZEOF(buf));
}
-
+
// read the last 'pos' bytes
bytes_read = Read(buf, (size_t)pos).LastRead();
if ( m_lasterror != wxSTREAM_NO_ERROR )
return wxInvalidOffset;
-
+
wxASSERT(bytes_read == (size_t)pos);
-
+
// we should now have seeked to the right position...
return TellI();
}