Skip to content

Commit

Permalink
Make a MemberComparer class more reliable (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taritsyn authored Jan 11, 2024
1 parent 6df5f19 commit db18344
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ClearScript/Util/MemberComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ private MemberComparer()

public override bool Equals(T x, T y)
{
if ((x == null) && (y == null))
{
return true;
}
else if ((x == null) || (y == null))
{
return false;
}

try
{
return (x.Module == y.Module) && (x.MetadataToken == y.MetadataToken);
Expand Down

0 comments on commit db18344

Please sign in to comment.