diff --git a/er-patcher b/er-patcher index 6ce90c3..09c075a 100755 --- a/er-patcher +++ b/er-patcher @@ -23,8 +23,7 @@ if __name__ == "__main__": exe_name = Path("eldenring.exe") with open(exe_name, "rb") as f: - exe = f.read() - exe_hex = exe.hex() + exe_hex = f.read().hex() if patch.rate != 60 and patch.rate > 0: exe_hex = exe_hex.replace( @@ -71,6 +70,8 @@ if __name__ == "__main__": with open(patched_exe_dir / exe_name, "wb") as f: f.write(bytes.fromhex(exe_hex)) + del exe_hex + # start patched exe directly to avoid EAC steam_cmd = sys.argv[1 + sys.argv.index("--"):] steam_cmd[-1] = Path(steam_cmd[-1]).parent.absolute() / patched_exe_dir / exe_name