From 56b71cf7feadb1ea6e21bdaf4cbe7676ce61aecf Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 28 Aug 2025 22:41:49 -0400 Subject: [PATCH] Overlay deals with real data only --- .../Wrappers/PortableExecutable.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/SabreTools.Serialization/Wrappers/PortableExecutable.cs b/SabreTools.Serialization/Wrappers/PortableExecutable.cs index f12bc010..1659e709 100644 --- a/SabreTools.Serialization/Wrappers/PortableExecutable.cs +++ b/SabreTools.Serialization/Wrappers/PortableExecutable.cs @@ -245,11 +245,7 @@ namespace SabreTools.Serialization.Wrappers continue; // Get the real section size - int sectionSize; - if (section.SizeOfRawData < section.VirtualSize) - sectionSize = (int)section.VirtualSize; - else - sectionSize = (int)section.SizeOfRawData; + int sectionSize = (int)section.SizeOfRawData; // Compare and set the end of section data if (sectionAddress + sectionSize > endOfSectionData) @@ -316,11 +312,7 @@ namespace SabreTools.Serialization.Wrappers continue; // Get the real section size - int sectionSize; - if (section.SizeOfRawData < section.VirtualSize) - sectionSize = (int)section.VirtualSize; - else - sectionSize = (int)section.SizeOfRawData; + int sectionSize = (int)section.SizeOfRawData; // Compare and set the end of section data if (sectionAddress + sectionSize > endOfSectionData)