From b33ae3a2a06d5e6d8a80085b43862ba16d8a591c Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 13:45:02 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/Lists/UIComboBoxDefWnd.cpp, Source/UI/Lists/UIComboBoxEx.cpp Batch #17062 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_11544 UIComboBoxDefWnd::SendMsg: logic confirmed by peer review - fn_11545 UIComboBoxEx::SendMsg: logic confirmed by peer review Peer-reviewed-by: Yommy, Toshiro, br4yan Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Lists/UIComboBoxDefWnd.cpp | 6 +++--- Source/UI/Lists/UIComboBoxEx.cpp | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/UI/Lists/UIComboBoxDefWnd.cpp b/Source/UI/Lists/UIComboBoxDefWnd.cpp index 20637dff6..cce6e46ee 100644 --- a/Source/UI/Lists/UIComboBoxDefWnd.cpp +++ b/Source/UI/Lists/UIComboBoxDefWnd.cpp @@ -180,7 +180,7 @@ int UIComboBoxDefWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st if (a == ID_OPEN_MEMBER_POS_COMBO) { this->expanded = this->expanded == 0; this->Resize( - this->geometry.width, this->expanded ? (this->geometry.height + this->list->geometry.height) : (this->geometry.height - this->list->geometry.height) + this->geometry.width, this->expanded ? (this->list->geometry.height + this->geometry.height) : (this->geometry.height - this->list->geometry.height) ); this->parent->Invalidate(); this->Invalidate(); @@ -202,7 +202,7 @@ int UIComboBoxDefWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st return 0; } - this->label->SetText(this->list->lines[value].text.c_str(), 0); + this->label->SetText(LineText(this->list, value), 0); this->SendMsg(nullptr, UM_COMMAND, ID_OPEN_MEMBER_POS_COMBO, 0, 0, 0); this->parent->SendMsg(this, UM_COMBOBOX_SELECTED, value, 0, 0, 0); return 0; @@ -210,7 +210,7 @@ int UIComboBoxDefWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st case UM_CHANGEMSG: { const int value = static_cast(a); if (value >= 0) { - this->label->SetText(this->list->lines[value].text.c_str(), 0); + this->label->SetText(LineText(this->list, value), 0); this->Invalidate(); } diff --git a/Source/UI/Lists/UIComboBoxEx.cpp b/Source/UI/Lists/UIComboBoxEx.cpp index 9454a4b07..b20bb538b 100644 --- a/Source/UI/Lists/UIComboBoxEx.cpp +++ b/Source/UI/Lists/UIComboBoxEx.cpp @@ -197,7 +197,11 @@ int UIComboBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i } case UM_ADDITEM: - this->AddLine(reinterpret_cast(a), static_cast(b)); + if (b) { + this->AddLine(reinterpret_cast(a), static_cast(b)); + } else { + this->AddLine(reinterpret_cast(a), 0); + } this->Invalidate(); return 0;