These can't be null anymore

This commit is contained in:
Matt Nadareski
2026-01-30 22:15:34 -05:00
parent efef8d494e
commit 2b3917a1ee
5 changed files with 5 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ namespace BinaryObjectScanner.Packer
// TODO: Investigate if this can be found by aligning to section containing entry point // TODO: Investigate if this can be found by aligning to section containing entry point
// Get the last section strings, if they exist // Get the last section strings, if they exist
var sections = exe.SectionTable ?? []; var sections = exe.SectionTable;
var strs = exe.GetSectionStrings(sections.Length - 1); var strs = exe.GetSectionStrings(sections.Length - 1);
if (strs is not null) if (strs is not null)
{ {

View File

@@ -65,7 +65,7 @@ namespace BinaryObjectScanner.Protection
// TODO: Investigate if this can be found by aligning to section containing entry point // TODO: Investigate if this can be found by aligning to section containing entry point
// Get the 4th and 5th sections, if they exist (example names: ACE4/ACE5) (Found in Redump entries 94792, 94793) // Get the 4th and 5th sections, if they exist (example names: ACE4/ACE5) (Found in Redump entries 94792, 94793)
var sections = exe.SectionTable ?? []; var sections = exe.SectionTable;
for (int i = 3; i < sections.Length; i++) for (int i = 3; i < sections.Length; i++)
{ {
var nthSectionData = exe.GetSectionData(i); var nthSectionData = exe.GetSectionData(i);

View File

@@ -292,7 +292,7 @@ namespace BinaryObjectScanner.Protection
// TODO: Investigate if this can be found by aligning to section containing entry point // TODO: Investigate if this can be found by aligning to section containing entry point
// Get the sections 5+, if they exist (example names: .fmqyrx, .vcltz, .iywiak) // Get the sections 5+, if they exist (example names: .fmqyrx, .vcltz, .iywiak)
var sections = exe.SectionTable ?? []; var sections = exe.SectionTable;
for (int i = 4; i < sections.Length; i++) for (int i = 4; i < sections.Length; i++)
{ {
var nthSection = sections[i]; var nthSection = sections[i];

View File

@@ -19,7 +19,7 @@ namespace BinaryObjectScanner.Protection
// TODO: Investigate if this can be found by aligning to section containing entry point // TODO: Investigate if this can be found by aligning to section containing entry point
var sections = exe.SectionTable ?? []; var sections = exe.SectionTable;
if (sections.Length > 0) if (sections.Length > 0)
{ {
// Get the last section data, if it exists // Get the last section data, if it exists

View File

@@ -85,7 +85,7 @@ namespace BinaryObjectScanner.Protection
// TODO: Investigate if this can be found by aligning to section containing entry point // TODO: Investigate if this can be found by aligning to section containing entry point
// Search the last two available sections // Search the last two available sections
var sections = exe.SectionTable ?? []; var sections = exe.SectionTable;
for (int i = Math.Max(sections.Length - 2, 0); i < sections.Length; i++) for (int i = Math.Max(sections.Length - 2, 0); i < sections.Length; i++)
{ {
// Get the nth section strings, if they exist // Get the nth section strings, if they exist