]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/string.cpp
Added view menu items to toggle row and col drag-resizing.
[wxWidgets.git] / src / common / string.cpp
index 559bf3311f664b16777add6d36bf1c66faad9f86..cd934faa9e50e533ade04244d37b14d283ab90a1 100644 (file)
@@ -113,7 +113,7 @@ extern const wxChar WXDLLEXPORT *wxEmptyString = &g_strEmpty.dummy;
 //       function wxVsnprintfA (A for ANSI), should also find one for Unicode
 //       strings in Unicode build
 #ifdef __WXMSW__
-    #if (defined(__VISUALC__) || defined(wxUSE_NORLANDER_HEADERS)) && !defined(__MINGW32__)
+    #if defined(__VISUALC__) || wxUSE_NORLANDER_HEADERS
         #define wxVsnprintfA     _vsnprintf
     #endif
 #else   // !Windows
@@ -290,11 +290,11 @@ void wxString::InitWith(const wxChar *psz, size_t nPos, size_t nLength)
 {
   Init();
 
-  wxASSERT( nPos <= wxStrlen(psz) );
-
   if ( nLength == wxSTRING_MAXLEN )
     nLength = wxStrlen(psz + nPos);
 
+  wxASSERT_MSG( nPos + nLength <= wxStrlen(psz), _T("index out of bounds") );
+
   STATISTICS_ADD(InitialLength, nLength);
 
   if ( nLength > 0 ) {