From 5e779b774746ba6174e952ce2468e6e2c6face0a Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 08:10:20 +0000 Subject: [PATCH] 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). --- Source/UI/UIChangeMaterialWnd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/UI/UIChangeMaterialWnd.cpp b/Source/UI/UIChangeMaterialWnd.cpp index 7d99c5cf..e72229e0 100644 --- a/Source/UI/UIChangeMaterialWnd.cpp +++ b/Source/UI/UIChangeMaterialWnd.cpp @@ -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(position / rowHeight + this->m_scrollOffset); const unsigned int last = static_cast(this->m_items.size() - 1); + unsigned int index = static_cast(position / rowHeight + this->m_scrollOffset); if (last < index) { index = last; }