From 26831b473266f738bba97260642f967ca4535e7a Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 3 Dec 2022 23:48:48 -0800 Subject: [PATCH] Both, both is good --- BurnOutSharp.Builder/PortableExecutable.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BurnOutSharp.Builder/PortableExecutable.cs b/BurnOutSharp.Builder/PortableExecutable.cs index 63347126..0a539b4d 100644 --- a/BurnOutSharp.Builder/PortableExecutable.cs +++ b/BurnOutSharp.Builder/PortableExecutable.cs @@ -715,7 +715,7 @@ namespace BurnOutSharp.Builder attributeCertificateTable.Add(entry); // Align to the 8-byte boundary - while (offset < endOffset - 1 && (offset % 8) != 0) + while ((offset % 8) != 0 && offset < endOffset - 1 && offset != data.Length - 1) _ = data.ReadByte(ref offset); } @@ -1866,7 +1866,7 @@ namespace BurnOutSharp.Builder attributeCertificateTable.Add(entry); // Align to the 8-byte boundary - while (data.Position < endOffset - 1 && (data.Position % 8) != 0) + while ((data.Position % 8) != 0 && data.Position < endOffset - 1 && data.Position != data.Length - 1) _ = data.ReadByteValue(); }