Use lib64 for 64-bit builds on some kinds of linux and lib/64 on solaris
[wxWidgets.git] / src / common / regex.cpp
index 896d2ad248d0ddb74fff668efab5078c17abc4a3..ac85aac9720510d86a72b0e23a529eca9edcef32 100644 (file)
@@ -296,7 +296,7 @@ bool wxRegExImpl::Matches(const wxChar *str, int flags) const
             return true;
 
         default:
-            // an error occured
+            // an error occurred
             wxLogError(_("Failed to match '%s' in regular expression: %s"),
                        str, GetErrorMsg(rc, !conv).c_str());
             // fall through
@@ -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;
 }