Skip to content

Commit 3df4e31

Browse files
committed
ByteArrayEqual: additional skip if instance identity (same array in a and b)
1 parent 2f23489 commit 3df4e31

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

KaitaiStream.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,9 @@ public static int ByteArrayCompare(byte[] a, byte[] b)
746746
/// </remarks>
747747
public static bool ByteArrayEqual(byte[] a, byte[] b)
748748
{
749+
if (a == b)
750+
return true;
751+
749752
int al = a.Length;
750753
int bl = b.Length;
751754

0 commit comments

Comments
 (0)