From: Vadim Zeitlin Date: Fri, 23 Mar 2012 15:13:16 +0000 (+0000) Subject: Don't cache incorrect length in wxString::DoUngetWriteBuf(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/42e86f64b77d0379f5a4598a4597cf3a43f1988a Don't cache incorrect length in wxString::DoUngetWriteBuf(). The length here is the size of the buffer in bytes and is not necessarily the string length in code points (notably not for non-ASCII strings in UTF-8 build). Closes #14130. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/string.h b/include/wx/string.h index 03c21a7acf..ee63cf915c 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -3485,7 +3485,7 @@ private: void DoUngetWriteBuf(size_t nLen) { - wxSTRING_SET_CACHED_LENGTH(nLen); + wxSTRING_INVALIDATE_CACHE(); m_impl.DoUngetWriteBuf(nLen); }