ICU-22376 solve memory related issue in setText

This commit is contained in:
Andrei Tudor TOPALĂ (101668) 2023-04-30 23:37:11 +03:00
parent 62f493827f
commit 2b82b243fe

View file

@ -236,7 +236,7 @@ void StringSearch::setText(const UnicodeString &text, UErrorCode &status)
{
if (U_SUCCESS(status)) {
m_text_ = text;
usearch_setText(m_strsrch_, text.getBuffer(), text.length(), &status);
usearch_setText(m_strsrch_, m_text_.getBuffer(), m_text_.length(), &status);
}
}