From c82b56d084e5c631ffb18f8d86cdd504a6e4f720 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 14 Mar 2026 11:23:29 -0400 Subject: [PATCH] Better clarify comment --- SabreTools.Serialization/Wrappers/PortableExecutable.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SabreTools.Serialization/Wrappers/PortableExecutable.cs b/SabreTools.Serialization/Wrappers/PortableExecutable.cs index 0f1155a7..a3472e67 100644 --- a/SabreTools.Serialization/Wrappers/PortableExecutable.cs +++ b/SabreTools.Serialization/Wrappers/PortableExecutable.cs @@ -342,11 +342,10 @@ namespace SabreTools.Serialization.Wrappers dataLength = certificateTableAddress; } - // Search through all sections and find the furthest a section goes + // Start from the first section with a valid raw data size and add all section sizes // TODO: Investigate cases where first section pointer does not work var firstSection = Array.Find(SectionTable, s => s.SizeOfRawData != 0); long endOfSectionData = firstSection.PointerToRawData; - Array.ForEach(SectionTable, s => endOfSectionData += s.SizeOfRawData); // If we didn't find the end of section data