Commit graph

1 commit

Author SHA1 Message Date
Kamron Batman
3a4dee0bf1 fix(advanced-search): E — descending sort last page renders its items
The paging loop in AdvancedSearchGump.Build assumed a full MaxEntries
page: on a partial last page in descending mode, the first iteration's
index already overflowed SearchResults.Length, and the break early-out
killed the whole loop, rendering zero rows.

Add a VisibleCount(total, displayFrom, maxEntries) helper and bound the
loop to it instead of MaxEntries, generalizing the descending offset
formula (MaxEntries - 1 - i -> visibleCount - 1 - i) so it stays valid
for partial pages while being identical to the old formula on full
pages.
2026-07-19 22:03:17 -07:00