From 42e86f64b77d0379f5a4598a4597cf3a43f1988a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 23 Mar 2012 15:13:16 +0000 Subject: [PATCH] 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 --- include/wx/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.45.2