Decompile fn_16210 (HighlightKeyword)

Batch #14004 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_16210 HighlightKeyword: logic confirmed by peer review

Peer-reviewed-by: secret, KWDev, 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-07 06:38:25 +00:00
commit aa99c11740

View file

@ -113,11 +113,11 @@ int HighlightKeyword(std::string& text, std::string_view keyword, std::string_vi
std::size_t position = 0;
while ((position = lowerText.find(lowerKeyword, position)) != std::wstring::npos) {
lowerText.insert(position, widePrefix.c_str(), widePrefix.size());
wideText.insert(position, widePrefix.c_str(), widePrefix.size());
lowerText.insert(position, widePrefix);
wideText.insert(position, widePrefix);
position += lowerKeyword.size() + widePrefix.size();
lowerText.insert(position, wideSuffix.c_str(), wideSuffix.size());
wideText.insert(position, wideSuffix.c_str(), wideSuffix.size());
lowerText.insert(position, wideSuffix);
wideText.insert(position, wideSuffix);
position += suffix.size();
++count;
}