X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f172cb8200f08ba1c6735a0d507991c877c0d68f..04458ef49607571946baabc14229beeb0ff918a4:/src/common/stringimpl.cpp

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);