]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/regex.cpp
Use lib64 for 64-bit builds on some kinds of linux and lib/64 on solaris
[wxWidgets.git] / src / common / regex.cpp
index 6f7d454e7723dbbfc9141a36ac6841e4a77225c7..ac85aac9720510d86a72b0e23a529eca9edcef32 100644 (file)
@@ -316,10 +316,11 @@ bool wxRegExImpl::GetMatch(size_t *start, size_t *len, size_t index) const
 
     const regmatch_t& match = m_Matches[index];
 
+    // we need the casts because rm_so can be a 64 bit quantity
     if ( start )
-        *start = match.rm_so;
+        *start = wx_truncate_cast(size_t, match.rm_so);
     if ( len )
-        *len = match.rm_eo - match.rm_so;
+        *len = wx_truncate_cast(size_t, match.rm_eo - match.rm_so);
 
     return true;
 }