X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f172cb8200f08ba1c6735a0d507991c877c0d68f..9ef1ad0d2ccb6dee00b1adc495ce055edd27844b:/src/common/stringimpl.cpp?ds=sidebyside diff --git a/src/common/stringimpl.cpp b/src/common/stringimpl.cpp index 4c30917521..d626556df9 100644 --- a/src/common/stringimpl.cpp +++ b/src/common/stringimpl.cpp @@ -180,7 +180,7 @@ wxStringImpl::wxStringImpl(const_iterator first, const_iterator last) { if ( last >= first ) { - InitWith(first, 0, last - first); + InitWith(first.GetPtr(), 0, last - first); } else { @@ -207,8 +207,8 @@ bool wxStringImpl::AllocBuffer(size_t nLen) wxASSERT( nLen > 0 ); // make sure that we don't overflow - wxASSERT( nLen < (INT_MAX / sizeof(wxStringCharType)) - - (sizeof(wxStringData) + EXTRA_ALLOC + 1) ); + wxCHECK( nLen < (INT_MAX / sizeof(wxStringCharType)) - + (sizeof(wxStringData) + EXTRA_ALLOC + 1), false ); STATISTICS_ADD(Length, nLen);