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:
parent
820edf391b
commit
4ffc2f33d1
1 changed files with 10 additions and 1 deletions
|
|
@ -86,7 +86,16 @@ namespace Server
|
||||||
if ( y == null )
|
if ( y == null )
|
||||||
return -1;
|
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 )
|
private int GetPriority( MethodInfo mi )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue