From 2f5053b49fb2744a834148b0ff71a70d1d6363e7 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 17 Jul 2021 17:08:15 -0700 Subject: [PATCH] Make StarForce checks AND not OR (fixes #46) --- BurnOutSharp/ProtectionType/StarForce.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BurnOutSharp/ProtectionType/StarForce.cs b/BurnOutSharp/ProtectionType/StarForce.cs index fab1d404..b8c68fef 100644 --- a/BurnOutSharp/ProtectionType/StarForce.cs +++ b/BurnOutSharp/ProtectionType/StarForce.cs @@ -122,14 +122,13 @@ namespace BurnOutSharp.ProtectionType /// public List CheckDirectoryPath(string path, IEnumerable files) { - // TODO: Verify if these are OR or AND var matchers = new List { new PathMatchSet(new PathMatch("protect.dll", useEndsWith: true), "StarForce"), new PathMatchSet(new PathMatch("protect.exe", useEndsWith: true), "StarForce"), }; - return MatchUtil.GetAllMatches(files, matchers, any: true); + return MatchUtil.GetAllMatches(files, matchers, any: false); } /// @@ -141,7 +140,7 @@ namespace BurnOutSharp.ProtectionType new PathMatchSet(new PathMatch("protect.exe", useEndsWith: true), "StarForce"), }; - return MatchUtil.GetFirstMatch(path, matchers, any: true); + return MatchUtil.GetFirstMatch(path, matchers, any: false); } public static string GetVersion(string file, byte[] fileContent, List positions)