Skip to content

Commit

Permalink
Write the patched exe using a different name
Browse files Browse the repository at this point in the history
  • Loading branch information
Molanda committed Jul 1, 2021
1 parent 7d9c179 commit 3050497
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Bin/Patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
if data.find(uuid_pair[2].bytes_le) >= 0:
print('The patch has already been applied.')
sys.exit(1)
if not os.path.exists('There-Original.exe'):
with open('There.orig', 'wb') as file:
file.write(data)
for uuid_pair in uuid_pairs:
index = 0
for i in range(uuid_pair[0]):
Expand All @@ -42,6 +39,6 @@
if data[index:].find(uuid_pair[1].bytes_le) >= 0:
print('The patch cannot be used with this version of There.')
sys.exit(1)
with open('There.exe', 'wb') as file:
with open('There-Patched.exe', 'wb') as file:
file.write(data)
print('The patch was applied successfully.')

0 comments on commit 3050497

Please sign in to comment.