Decompile fn_16122 (CUIListBoxEx<ProbabilityTable::CUIItem,ProbabilityTable::CItemData>::AddNewItem)

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

- fn_16122 CUIListBoxEx<ProbabilityTable::CUIItem,ProbabilityTable::CItemData>::AddNewItem: logic confirmed by peer review

Peer-reviewed-by: gordaoprogramas, Tanke, Toshiro
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-06 13:46:42 +00:00
commit 0c7e84e4d7

View file

@ -278,9 +278,9 @@ void CUIListBoxEx<ProbabilityTable::CUIItem, ProbabilityTable::CItemData>::AddNe
this->items.clear();
this->selected = static_cast<unsigned int>(-1);
if (this->rowHeight <= this->geometry.height) {
if (this->geometry.height >= this->rowHeight) {
unsigned int count = static_cast<unsigned int>(this->geometry.height / this->rowHeight) + 1;
if (this->geometry.height % this->rowHeight > 1) {
if (this->geometry.height % this->rowHeight >= 2) {
++count;
}
this->items.resize(count, nullptr);