]> git.saurik.com Git - wxWidgets.git/commitdiff
Seek calls take an offset which can validly be negative. Use >= LONG_MIN not 0
authorDavid Elliott <dfe@tgwbd.org>
Tue, 23 Nov 2004 16:22:43 +0000 (16:22 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Tue, 23 Nov 2004 16:22:43 +0000 (16:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wfstream.cpp

index d89d5bfb6420b796bf9a271d5239bd9f1d21e1a2..af90722dd08a861976ba447d718f07e95b059f09 100644 (file)
@@ -253,7 +253,7 @@ wxFileOffset wxFFileInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode)
 #ifdef __VMS
 #pragma message disable intsignchange
 #endif
 #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
     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
 #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
     return ( m_file->Seek((long)pos, mode) ? (wxFileOffset)m_file->Tell() : wxInvalidOffset );
 #ifdef __VMS
 #pragma message enable intsignchange