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:
@@ -3485,7 +3485,7 @@ private:
|
|||||||
|
|
||||||
void DoUngetWriteBuf(size_t nLen)
|
void DoUngetWriteBuf(size_t nLen)
|
||||||
{
|
{
|
||||||
wxSTRING_SET_CACHED_LENGTH(nLen);
|
wxSTRING_INVALIDATE_CACHE();
|
||||||
|
|
||||||
m_impl.DoUngetWriteBuf(nLen);
|
m_impl.DoUngetWriteBuf(nLen);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user