diff --git a/Source/Client/Input/Language.cpp b/Source/Client/Input/Language.cpp index e913edffe..70632fb5f 100644 --- a/Source/Client/Input/Language.cpp +++ b/Source/Client/Input/Language.cpp @@ -140,10 +140,10 @@ void CLanguageBase::CopySelection() { end = this->anchor; } - if (this->password) { - std::memset(data, '*', static_cast(this->text.size()) - static_cast(begin)); - } else { + if (!this->password) { std::memcpy(data, this->text.c_str() + begin, end - begin); + } else { + std::memset(data, '*', static_cast(this->text.size()) - static_cast(begin)); } data[std::abs(this->cursor - this->anchor)] = 0;