diff --git a/lslopt/lslbasefuncs.py b/lslopt/lslbasefuncs.py index 30e23f8..1788305 100644 --- a/lslopt/lslbasefuncs.py +++ b/lslopt/lslbasefuncs.py @@ -1704,8 +1704,8 @@ def llListSort(lst, stride, asc, idx=0): # swap lst[i:i+stride],lst[j:j+stride] = lst[j:j+stride],lst[i:i+stride] # Re-cache - a = lst[i] - ta = type(a) + a = b + ta = tb if ta == Vector: a = v2f(a) a = a[0]*a[0] + a[1]*a[1] + a[2]*a[2] diff --git a/unit_tests/expr.suite/list-funcs-7.lsl b/unit_tests/expr.suite/list-funcs-7.lsl index fff867d..9d30939 100644 --- a/unit_tests/expr.suite/list-funcs-7.lsl +++ b/unit_tests/expr.suite/list-funcs-7.lsl @@ -7,3 +7,4 @@ + "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) diff --git a/unit_tests/expr.suite/list-funcs-7.out b/unit_tests/expr.suite/list-funcs-7.out index 5d2a8fb..424d0b0 100644 --- a/unit_tests/expr.suite/list-funcs-7.out +++ b/unit_tests/expr.suite/list-funcs-7.out @@ -49,4 +49,17 @@ , "B" , 1 , "C" +, "T10" +, 1 +, "a" +, 0 +, "a" +, 0 +, "b" +, 1 +, "b" +, 1 +, "c" +, 0 +, "c" ] \ No newline at end of file