Skip to content

Commit

Permalink
Fixed iterate same x, y in ByteArrayComparer.Compare
Browse files Browse the repository at this point in the history
  • Loading branch information
cschuchardt88 committed Feb 13, 2024
1 parent 259d29a commit 326bdce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Neo.IO/ByteArrayComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ private ByteArrayComparer(int direction)

public int Compare(byte[]? x, byte[]? y)
{
if (x is not null && y is not null && x == y) return 0;
if (x is null && y is not null)
return _direction > 0 ? -y.Length : y.Length;
if (y is null && x is not null)
Expand Down

0 comments on commit 326bdce

Please sign in to comment.