From 8f3258e39d878b782765a354f1bf794082d9c8d1 Mon Sep 17 00:00:00 2001 From: beerpsi Date: Thu, 11 Apr 2024 16:12:39 +0700 Subject: [PATCH] Say which signatures failed if a patch is not found --- Program.cs | 5 +++-- README.md | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Program.cs b/Program.cs index d2a8df3..93c31e1 100644 --- a/Program.cs +++ b/Program.cs @@ -40,10 +40,11 @@ foreach (var patch in patches) .Zip(scanner.FindPatternsCached(signatures)!) .GroupBy(p => p.First) .ToDictionary(g => g.Key, g => g.First().Second); + var nonMatches = matches.Where(p => !p.Value.Found).ToList(); - if (matches.Any(p => !p.Value.Found)) + if (nonMatches.Count > 0) { - Console.WriteLine($"No offset found for patch {patch.Name}"); + Console.WriteLine($"No offset found for patch {patch.Name}, signatures {string.Join(",", nonMatches.Select(p => p.Key))}"); continue; } diff --git a/README.md b/README.md index 9666a31..07969b2 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ A shittily written patch finder hacked together with Originally written for CHUNITHM, hence the name, but can be used with pretty much anything as long as you have the signatures. +Does not do any patch validation for now. + ## Usage ```sh ./CHUNITHM-Patch-Finder