Decompile fn_03883 (UIChangeMaterialWnd_List::sub_5E2590)

Batch #11990 by Lumen: 0 byte-identical, 1 confirmed by peer review.

- fn_03883 UIChangeMaterialWnd_List::sub_5E2590: logic confirmed by peer review

Peer-reviewed-by: Yommy, KWDev
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 08:10:20 +00:00
commit 5e779b7747

View file

@ -150,8 +150,8 @@ void UIChangeMaterialWnd_List::Move(int x, int y) {
// FUNCTION: fn_03883
void UIChangeMaterialWnd_List::sub_5E2590(int, int position) {
const int rowHeight = this->unknown_00B4;
unsigned int index = static_cast<unsigned int>(position / rowHeight + this->m_scrollOffset);
const unsigned int last = static_cast<unsigned int>(this->m_items.size() - 1);
unsigned int index = static_cast<unsigned int>(position / rowHeight + this->m_scrollOffset);
if (last < index) {
index = last;
}