Decompile fn_10905 (UIEditCtrl::Synchronize)

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

- fn_10905 UIEditCtrl::Synchronize: logic confirmed by peer review

Peer-reviewed-by: Yommy, Tanke, 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-05 12:58:41 +00:00
commit 2a26ed30fe

View file

@ -5,6 +5,7 @@
#include <algorithm>
#include <cstdint>
#include <cstdlib>
#include <cstring>
// OFFSET: 0x00862FB0
@ -29,8 +30,8 @@ void UIEditCtrl::Synchronize() {
return;
}
const auto selection =
static_cast<std::uint32_t>(std::max(g_serverLanguage->cursor, g_serverLanguage->anchor)) - static_cast<std::uint32_t>(std::min(g_serverLanguage->cursor, g_serverLanguage->anchor));
std::string visibleText;
const auto selection = static_cast<std::uint32_t>(std::abs(g_serverLanguage->cursor - g_serverLanguage->anchor));
if (selection >= length) {
this->firstVisible = 0;