From b6c6c01358bee1a359bbf0a5057ad23f1bd65678 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 15 Mar 2022 15:47:37 -0700 Subject: [PATCH] Slightly rearrange generic content check invocation --- BurnOutSharp/FileType/Executable.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BurnOutSharp/FileType/Executable.cs b/BurnOutSharp/FileType/Executable.cs index 19d38d63..b043f0ba 100644 --- a/BurnOutSharp/FileType/Executable.cs +++ b/BurnOutSharp/FileType/Executable.cs @@ -107,10 +107,10 @@ namespace BurnOutSharp.FileType stream.Seek(0, SeekOrigin.Begin); // Iterate through all generic content checks - Parallel.ForEach(contentCheckClasses, contentCheckClass => + // Check using custom content checks first + if (fileContent != null) { - // Check using custom content checks first - if (fileContent != null) + Parallel.ForEach(contentCheckClasses, contentCheckClass => { string protection = contentCheckClass.CheckContents(file, fileContent, scanner.IncludeDebug, pex, nex); if (ShouldAddProtection(contentCheckClass, scanner, protection)) @@ -126,8 +126,8 @@ namespace BurnOutSharp.FileType Utilities.AppendToDictionary(protections, subProtections); } } - } - }); + }); + } // If we have a NE executable, iterate through all NE content checks if (nex?.Initialized == true)