]> git.saurik.com Git - wxWidgets.git/commit
Don't cache incorrect length in wxString::assign(char*, size_t).
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 23 Mar 2012 15:13:13 +0000 (15:13 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 23 Mar 2012 15:13:13 +0000 (15:13 +0000)
commit556a836e0f3bebc68227f516112cbd714cd01c9e
tree02250b79bfa46b0a4b99aa31687a10d24b5802a8
parentbd42a07c7a528c607e7327dcd194b739fb242da2
Don't cache incorrect length in wxString::assign(char*, size_t).

The length of the string here is specified in bytes and is not the same as the
string length for non-ASCII UTF-8 strings, so don't cache it as the string
length.

Just invalidate the cached length instead as we simply don't know what the
real length of the string is going to be.

See #14130.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/string.h
tests/strings/strings.cpp