Clean up awkard SolidShield check

This commit is contained in:
Matt Nadareski
2022-12-08 17:16:47 -08:00
parent a5158f04db
commit 5ce4f3be56

View File

@@ -75,10 +75,9 @@ namespace BurnOutSharp.ProtectionType
return "SolidShield EXE Wrapper v1";
// Search the last two available sections
var sectionNames = pex.SectionNames;
for (int i = (sectionNames.Length >= 2 ? sectionNames.Length - 2 : 0); i < sectionNames.Length; i++)
for (int i = (pex.SectionNames.Length >= 2 ? pex.SectionNames.Length - 2 : 0); i < pex.SectionNames.Length; i++)
{
var nthSectionRaw = pex.GetLastSectionData(sectionNames[i]);
var nthSectionRaw = pex.GetSectionData(i);
if (nthSectionRaw != null)
{
var matchers = new List<ContentMatchSet>