LSL-PyOptimizer/unit_tests/expr.suite/list-funcs-7.lsl
Sei Lisa 1d6bb809bf Fix bug in llListSortStrided producing incorrect results sometimes
It used `a = lst[i]` instead of taking the stride index into account (that is, it should have been `a = lst[i+idx]`). Anyway, the exact same value is in b, so use that instead.

Test case by Tapple Gao.
2024-10-09 01:40:19 +02:00

10 lines
685 B
Text

"T1" + llListSortStrided(["a", "á", "B", "C", "d", "e"], 1, 0, TRUE)
+ "T2" + llListSortStrided([1, "C", 3, "A", 2, "B"], 1, 0, TRUE)
+ "T3" + llListSortStrided([1, 3, 2, "C", "A", "B"], 1, 0, TRUE)
+ "T4" + llListSortStrided([1, "C", 3, "A", 2, "B"], 2, 0, TRUE)
+ "T5" + llListSortStrided([1, "C", 3, "A", 2, "B"], 2, 1, TRUE)
+ "T6" + llListSortStrided([1, "C", 3, "A", 2, "B"], 2, 2, TRUE)
+ "T7" + llListSortStrided([1, "C", 3, "A", 2, "B"], 2, -3, TRUE)
+ "T8" + llListSortStrided([1, "C", 3, "A", 2, "B"], 2, -2, TRUE)
+ "T9" + llListSortStrided([1, "C", 3, "A", 2, "B"], 2, -1, TRUE)
+ "T10" + llListSortStrided([1, "b", 0, "c", 1, "a", 0, "b", 1, "c", 0, "a"], 2, 1, TRUE)