diff options
author | UbitUmarov | 2015-09-28 16:03:10 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-28 16:03:10 +0100 |
commit | fd20a9576db3eb720ff77b15d93e7f71910272d7 (patch) | |
tree | c0fb858ecf0dc7f64123742b439b8803a85bfa99 /OpenSim | |
parent | ... merge issue (diff) | |
download | opensim-SC-fd20a9576db3eb720ff77b15d93e7f71910272d7.zip opensim-SC-fd20a9576db3eb720ff77b15d93e7f71910272d7.tar.gz opensim-SC-fd20a9576db3eb720ff77b15d93e7f71910272d7.tar.bz2 opensim-SC-fd20a9576db3eb720ff77b15d93e7f71910272d7.tar.xz |
... post merge issue
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 7738948..c34aecc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -741,16 +741,24 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
741 | 741 | ||
742 | public static bool operator ==(list a, list b) | 742 | public static bool operator ==(list a, list b) |
743 | { | 743 | { |
744 | int la = a.Length; | 744 | int la = -1; |
745 | int lb = b.Length; | 745 | int lb = -1; |
746 | try { la = a.Length; } | ||
747 | catch (NullReferenceException) { } | ||
748 | try { lb = b.Length; } | ||
749 | catch (NullReferenceException) { } | ||
746 | 750 | ||
747 | return la == lb; | 751 | return la == lb; |
748 | } | 752 | } |
749 | 753 | ||
750 | public static bool operator !=(list a, list b) | 754 | public static bool operator !=(list a, list b) |
751 | { | 755 | { |
752 | int la = a.Length; | 756 | int la = -1; |
753 | int lb = b.Length; | 757 | int lb = -1; |
758 | try { la = a.Length; } | ||
759 | catch (NullReferenceException) { } | ||
760 | try { lb = b.Length; } | ||
761 | catch (NullReferenceException) { } | ||
754 | 762 | ||
755 | return la != lb; | 763 | return la != lb; |
756 | } | 764 | } |
@@ -984,7 +992,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
984 | ret = Math.Sign(Quaternion.Mag(l) - Quaternion.Mag(r)); | 992 | ret = Math.Sign(Quaternion.Mag(l) - Quaternion.Mag(r)); |
985 | } | 993 | } |
986 | 994 | ||
987 | if (ascending != 1) | 995 | if (ascending == 0) |
988 | { | 996 | { |
989 | ret = 0 - ret; | 997 | ret = 0 - ret; |
990 | } | 998 | } |
@@ -1039,7 +1047,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1039 | if (homogeneous) | 1047 | if (homogeneous) |
1040 | { | 1048 | { |
1041 | Array.Sort(ret, new HomogeneousComparer()); | 1049 | Array.Sort(ret, new HomogeneousComparer()); |
1042 | if (ascending != 1) | 1050 | if (ascending == 0) |
1043 | { | 1051 | { |
1044 | Array.Reverse(ret); | 1052 | Array.Reverse(ret); |
1045 | } | 1053 | } |