From: Vadim Zeitlin Date: Fri, 26 Jun 1998 15:39:01 +0000 (+0000) Subject: corrected "of by 1" error in wxString::insert() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/68919656bbaa4b292162e790b272e205aa41175c corrected "of by 1" error in wxString::insert() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/string.cpp b/src/common/string.cpp index 415a533501..2b95e23f12 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -896,7 +896,7 @@ wxString& wxString::insert(size_t nPos, const wxString& str) wxASSERT( nPos <= Len() ); wxString strTmp; - char *pc = strTmp.GetWriteBuf(Len() + str.Len() + 1); + char *pc = strTmp.GetWriteBuf(Len() + str.Len()); strncpy(pc, c_str(), nPos); strcpy(pc + nPos, str); strcpy(pc + nPos + str.Len(), c_str() + nPos);