Seek calls take an offset which can validly be negative. Use >= LONG_MIN not 0

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott 2004-11-23 16:22:43 +00:00
parent 6ab3c239ea
commit 0a1390c7d8

View File

@ -253,7 +253,7 @@ wxFileOffset wxFFileInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode)
#ifdef __VMS
#pragma message disable intsignchange
#endif
wxASSERT_MSG( pos >= 0 && pos <= LONG_MAX, _T("no huge wxFFile support") );
wxASSERT_MSG( pos >= LONG_MIN && pos <= LONG_MAX, _T("no huge wxFFile support") );
return ( m_file->Seek((long)pos, mode) ? (wxFileOffset)m_file->Tell() : wxInvalidOffset );
#ifdef __VMS
#pragma message enable intsignchange
@ -334,7 +334,7 @@ wxFileOffset wxFFileOutputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode)
#ifdef __VMS
#pragma message disable intsignchange
#endif
wxASSERT_MSG( pos >= 0 && pos <= LONG_MAX, _T("no huge wxFFile support") );
wxASSERT_MSG( pos >= LONG_MIN && pos <= LONG_MAX, _T("no huge wxFFile support") );
return ( m_file->Seek((long)pos, mode) ? (wxFileOffset)m_file->Tell() : wxInvalidOffset );
#ifdef __VMS
#pragma message enable intsignchange