mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
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.
This commit is contained in:
parent
d2f81046d5
commit
1d6bb809bf
3 changed files with 16 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue