X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3103e8a97e834e9793f0eb149aa82a99fd64ef9a..a0845d45830eb22769107a61a6cb3485fa21922b:/src/common/regex.cpp?ds=sidebyside diff --git a/src/common/regex.cpp b/src/common/regex.cpp index 6f7d454e77..ac85aac972 100644 --- a/src/common/regex.cpp +++ b/src/common/regex.cpp @@ -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; }