aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 9e6752c..8adf4c5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -858,7 +858,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
858 ret = Math.Sign(Quaternion.Mag(l) - Quaternion.Mag(r)); 858 ret = Math.Sign(Quaternion.Mag(l) - Quaternion.Mag(r));
859 } 859 }
860 860
861 if (ascending == 0) 861 if (ascending != 1)
862 { 862 {
863 ret = 0 - ret; 863 ret = 0 - ret;
864 } 864 }
@@ -891,6 +891,9 @@ namespace OpenSim.Region.ScriptEngine.Shared
891 stride = 1; 891 stride = 1;
892 } 892 }
893 893
894 if ((Data.Length % stride) != 0)
895 return new list(ret);
896
894 // we can optimize here in the case where stride == 1 and the list 897 // we can optimize here in the case where stride == 1 and the list
895 // consists of homogeneous types 898 // consists of homogeneous types
896 899
@@ -910,7 +913,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
910 if (homogeneous) 913 if (homogeneous)
911 { 914 {
912 Array.Sort(ret, new HomogeneousComparer()); 915 Array.Sort(ret, new HomogeneousComparer());
913 if (ascending == 0) 916 if (ascending != 1)
914 { 917 {
915 Array.Reverse(ret); 918 Array.Reverse(ret);
916 } 919 }