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
This commit is contained in:
Vadim Zeitlin 2012-03-23 15:13:16 +00:00
parent 556a836e0f
commit 42e86f64b7

View File

@ -3485,7 +3485,7 @@ private:
void DoUngetWriteBuf(size_t nLen)
{
wxSTRING_SET_CACHED_LENGTH(nLen);
wxSTRING_INVALIDATE_CACHE();
m_impl.DoUngetWriteBuf(nLen);
}