Fix erroneous CallPriorityAttribute computation.

Previous method of computing resulted in unexpected ordering when using Int32.MinValue or Int32.MaxValue as the Priority value.
This commit is contained in:
LG Archer 2016-05-17 10:41:51 +01:00
parent 820edf391b
commit 4ffc2f33d1

View file

@ -86,7 +86,16 @@ namespace Server
if ( y == null )
return -1;
return GetPriority( x ) - GetPriority( y );
var xPriority = GetPriority( x );
var yPriority = GetPriority( y );
if ( xPriority > yPriority )
return 1;
if ( xPriority < yPriority )
return -1;
return 0;
}
private int GetPriority( MethodInfo mi )