Core: String fix for sanitizer

git-svn-id: svn://ultimatepp.org/upp/trunk@14629 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-06-23 13:16:37 +00:00
parent 2594b1e983
commit dfafee9e31

View file

@ -304,13 +304,13 @@ int String::GetCharCount() const
String::String(StringBuffer& b)
{
Zero();
if(b.pbegin == b.buffer) {
String0::Set0(b.pbegin, (int)(uintptr_t)(b.pend - b.pbegin));
return;
}
int l = b.GetLength();
if(l <= 14) {
Zero();
memcpy8(chr, b.pbegin, l);
SLen() = l;
b.Free();