]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxCHECK instead of wxASSERT in Alloc() to avoid crashing when (trying to) use...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Apr 2008 17:54:02 +0000 (17:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Apr 2008 17:54:02 +0000 (17:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/stringimpl.cpp

index e182044be1eca6debda898501bf2127ba344e0cb..d626556df9ffe47ffc4c6cf962e9e05d01bb42a2 100644 (file)
@@ -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);