Fix reading generic sections

This commit is contained in:
Matt Nadareski
2021-09-15 11:47:12 -07:00
parent ba97abed44
commit a579bfea1f
5 changed files with 62 additions and 48 deletions

View File

@@ -16,7 +16,7 @@ namespace BurnOutSharp.ProtectionType
return null;
// Get the last .bss section, if it exists
var bssSectionRaw = pex.ReadRawSection(fileContent, ".bss", true);
var bssSectionRaw = pex.ReadRawSection(fileContent, ".bss", first: false);
if (bssSectionRaw != null)
{
var matchers = new List<ContentMatchSet>

View File

@@ -18,7 +18,7 @@ namespace BurnOutSharp.ProtectionType
return null;
// Get the .grand section, if it exists
var grandSectionRaw = pex.ReadRawSection(fileContent, ".grand", true);
var grandSectionRaw = pex.ReadRawSection(fileContent, ".grand", first: true);
if (grandSectionRaw != null)
{
var matchers = new List<ContentMatchSet>

View File

@@ -48,7 +48,7 @@ namespace BurnOutSharp.ProtectionType
return $"SolidShield Activation Manager Module {GetFileVersion(pex)}";
// Get the .init section, if it exists
var initSectionRaw = pex.ReadRawSection(fileContent, ".init", true);
var initSectionRaw = pex.ReadRawSection(fileContent, ".init", first: true);
if (initSectionRaw != null)
{
var matchers = new List<ContentMatchSet>

View File

@@ -16,7 +16,7 @@ namespace BurnOutSharp.ProtectionType
return null;
// Get the CODE section, if it exists
var codeSectionRaw = pex.ReadRawSection(fileContent, "CODE", true);
var codeSectionRaw = pex.ReadRawSection(fileContent, "CODE", first: true);
if (codeSectionRaw != null)
{
var matchers = new List<ContentMatchSet>