Skip to content

Commit

Permalink
ByteArrayEqual: additional skip if instance identity (same array in a…
Browse files Browse the repository at this point in the history
… and b)
  • Loading branch information
arekbulski committed Apr 6, 2018
1 parent 2f23489 commit 3df4e31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions KaitaiStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,9 @@ public static int ByteArrayCompare(byte[] a, byte[] b)
/// </remarks>
public static bool ByteArrayEqual(byte[] a, byte[] b)
{
if (a == b)
return true;

int al = a.Length;
int bl = b.Length;

Expand Down

0 comments on commit 3df4e31

Please sign in to comment.