Decompile fn_17765 (CLanguageBase::CopySelection)

Batch #12853 by cremane: 0 byte-identical, 1 confirmed by peer review.

- fn_17765 CLanguageBase::CopySelection: logic confirmed by peer review

Peer-reviewed-by: Yommy, aDw, codeplay
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-06 01:56:55 +00:00
commit 5cf28ecbc9

View file

@ -140,10 +140,10 @@ void CLanguageBase::CopySelection() {
end = this->anchor;
}
if (this->password) {
std::memset(data, '*', static_cast<std::uint32_t>(this->text.size()) - static_cast<std::uint32_t>(begin));
} else {
if (!this->password) {
std::memcpy(data, this->text.c_str() + begin, end - begin);
} else {
std::memset(data, '*', static_cast<std::uint32_t>(this->text.size()) - static_cast<std::uint32_t>(begin));
}
data[std::abs(this->cursor - this->anchor)] = 0;