]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/string.cpp
fixing overrelease and out-of-bounds write, fixes #13725
[wxWidgets.git] / src / common / string.cpp
index d92df7a08c0b133091c5bcc6f16c5389d060b2c1..3dea38ec671f18cb97e66c8eef8c9247224178f6 100644 (file)
@@ -1169,12 +1169,6 @@ int wxString::CmpNoCase(const wxString& s) const
 
 #if wxUSE_UNICODE
 
-#ifdef __MWERKS__
-#ifndef __SCHAR_MAX__
-#define __SCHAR_MAX__ 127
-#endif
-#endif
-
 wxString wxString::FromAscii(const char *ascii, size_t len)
 {
     if (!ascii || len == 0)
@@ -1442,7 +1436,7 @@ size_t wxString::Replace(const wxString& strOld,
     }
     else if ( !bReplaceAll)
     {
-        size_t pos = m_impl.find(strOld, 0);
+        size_t pos = m_impl.find(strOld.m_impl, 0);
         if ( pos != npos )
         {
             m_impl.replace(pos, strOld.m_impl.length(), strNew.m_impl);