]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sstream.cpp
implementing pure carbon event behaviour, getting rid of doubly executed events
[wxWidgets.git] / src / common / sstream.cpp
index 0e783fb64084a58a34148630fd88d2cf7ca47e37..8033dff28c97ced7ec0777d2b3843c0948b74f62 100644 (file)
@@ -93,10 +93,11 @@ wxFileOffset wxStringInputStream::OnSysSeek(wxFileOffset ofs, wxSeekMode mode)
             return wxInvalidOffset;
     }
 
-    if ( ofs < 0 || wx_static_cast(size_t, ofs) > m_len )
+    if ( ofs < 0 || ofs > wx_static_cast(wxFileOffset, m_len) )
         return wxInvalidOffset;
 
-    m_pos = wx_static_cast(size_t, ofs);
+    // FIXME: this can't be right
+    m_pos = wx_truncate_cast(size_t, ofs);
 
     return ofs;
 }