diff --git a/BinaryObjectScanner.Test/BinaryObjectScanner.Test.csproj b/BinaryObjectScanner.Test/BinaryObjectScanner.Test.csproj
index b30e17b6..755f1bdf 100644
--- a/BinaryObjectScanner.Test/BinaryObjectScanner.Test.csproj
+++ b/BinaryObjectScanner.Test/BinaryObjectScanner.Test.csproj
@@ -12,12 +12,12 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
-
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/BinaryObjectScanner/BinaryObjectScanner.csproj b/BinaryObjectScanner/BinaryObjectScanner.csproj
index 86813c18..000f1b26 100644
--- a/BinaryObjectScanner/BinaryObjectScanner.csproj
+++ b/BinaryObjectScanner/BinaryObjectScanner.csproj
@@ -46,12 +46,12 @@
-
+
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/BinaryObjectScanner/Packer/EmbeddedFile.cs b/BinaryObjectScanner/Packer/EmbeddedFile.cs
index d8a70442..42d9d40e 100644
--- a/BinaryObjectScanner/Packer/EmbeddedFile.cs
+++ b/BinaryObjectScanner/Packer/EmbeddedFile.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
+using SabreTools.Data.Models.PortableExecutable.Resource.Entries;
using SabreTools.IO.Extensions;
using SabreTools.Serialization.Wrappers;
@@ -116,7 +117,11 @@ namespace BinaryObjectScanner.Packer
// Get the resources that have an archive signature
foreach (var value in resourceData.Values)
{
- if (value is null || value is not byte[] ba || ba.Length == 0)
+ if (value is null || value is not GenericResourceEntry gre)
+ continue;
+
+ byte[] ba = gre.Data;
+ if (ba.Length == 0)
continue;
// Set the output variables
diff --git a/BinaryObjectScanner/Protection/DiscGuard.cs b/BinaryObjectScanner/Protection/DiscGuard.cs
index f9a9f691..f2897ba9 100644
--- a/BinaryObjectScanner/Protection/DiscGuard.cs
+++ b/BinaryObjectScanner/Protection/DiscGuard.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
+using SabreTools.Data.Models.PortableExecutable.Resource.Entries;
using SabreTools.IO;
using SabreTools.IO.Extensions;
using SabreTools.IO.Matching;
@@ -63,7 +64,7 @@ namespace BinaryObjectScanner.Protection
return "DiscGuard";
// Found in "Alternate.exe" (Redump entry 31914) and "Alt.exe" (Redump entries 46743, 46961, 79284, and 79374).
- List?> resources =
+ List resources =
[
.. exe.FindStringTableByEntry("DiscGuard"),
.. exe.FindStringTableByEntry("The file Dg.vbn was not found."),
diff --git a/ProtectionScan/ProtectionScan.csproj b/ProtectionScan/ProtectionScan.csproj
index 303a4565..0e66c01e 100644
--- a/ProtectionScan/ProtectionScan.csproj
+++ b/ProtectionScan/ProtectionScan.csproj
@@ -33,7 +33,7 @@
-
+
\ No newline at end of file