From efa6fd29bc14744b9427149d96f516f93c874770 Mon Sep 17 00:00:00 2001 From: Jeddunk Date: Tue, 25 Aug 2020 13:51:33 +0200 Subject: [PATCH] Fixed second DLL not patching properly. --- src/main/java/Controller.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/Controller.java b/src/main/java/Controller.java index 30a6128..a62ed86 100644 --- a/src/main/java/Controller.java +++ b/src/main/java/Controller.java @@ -350,7 +350,7 @@ public class Controller { */ private void setUpCreamApi() throws IOException { Path path = Paths.get(steamApiPathString); - copyDllFile(path); + copyDllFile(path, isSameFile); findAdditionalDll(path); } @@ -363,14 +363,11 @@ public class Controller { InputStream is = Files.newInputStream(secondDll); String md5 = DigestUtils.md5Hex(is); boolean isSameFile1 = Objects.equals(md5, handler.getDllMd5(!is64Bit)); - if (isSameFile1) { - System.out.println("Alternative DLL not patched! Patching..."); - copyDllFile(secondDll); - } + copyDllFile(secondDll, isSameFile1); } } - private void copyDllFile(Path path) throws IOException { + private void copyDllFile(Path path, boolean isSameFile) throws IOException { if (!isSameFile) { String pathOrigString = steamApiPathString; pathOrigString =