On Fri Jul 26 12:45:53 2024 +0000, Fabian Maurer wrote:
Would you mind adding a `Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56140%60 into the comment? To explain, the callback function takes two indices, which are relative to the original (unsorted) array. The indices are calculated in `LISTVIEW_CallBackCompare/Ex`, finding the position of the items in `context->items`. So if we need to pass the original array here, otherwise we get messed up indices. Right?
Yes. If we pass the copied array indices, which are different because of the sorting, the caller is going to use those indices for their unsorted array which don't match.