... post merge issue

avinationmerge
UbitUmarov 2015-09-28 16:03:10 +01:00
parent 6ded1da9f2
commit fd20a9576d
1 changed files with 14 additions and 6 deletions

View File

@ -741,16 +741,24 @@ namespace OpenSim.Region.ScriptEngine.Shared
public static bool operator ==(list a, list b) public static bool operator ==(list a, list b)
{ {
int la = a.Length; int la = -1;
int lb = b.Length; int lb = -1;
try { la = a.Length; }
catch (NullReferenceException) { }
try { lb = b.Length; }
catch (NullReferenceException) { }
return la == lb; return la == lb;
} }
public static bool operator !=(list a, list b) public static bool operator !=(list a, list b)
{ {
int la = a.Length; int la = -1;
int lb = b.Length; int lb = -1;
try { la = a.Length; }
catch (NullReferenceException) { }
try { lb = b.Length; }
catch (NullReferenceException) { }
return la != lb; return la != lb;
} }
@ -984,7 +992,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
ret = Math.Sign(Quaternion.Mag(l) - Quaternion.Mag(r)); ret = Math.Sign(Quaternion.Mag(l) - Quaternion.Mag(r));
} }
if (ascending != 1) if (ascending == 0)
{ {
ret = 0 - ret; ret = 0 - ret;
} }
@ -1039,7 +1047,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
if (homogeneous) if (homogeneous)
{ {
Array.Sort(ret, new HomogeneousComparer()); Array.Sort(ret, new HomogeneousComparer());
if (ascending != 1) if (ascending == 0)
{ {
Array.Reverse(ret); Array.Reverse(ret);
} }