Skip to content

Commit

Permalink
this is safer
Browse files Browse the repository at this point in the history
  • Loading branch information
KabanFriends committed Dec 29, 2022
1 parent cb4d4a6 commit da1d320
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions patch_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@
data = overlay.patch.main(args.lang, data, "overlay")

text = "eCDP English Translation Patch v1.0.0 - https://github.com/eCDP-English/translation"
tbytes = text.encode("SHIFT-JIS")
tlen = len(tbytes)
blen = len(data)
offset = 0
for b in tbytes:
if data[blen-tlen+offset] == 0xFF:
data[blen-tlen+offset] = b
offset += 1
for b in text.encode("SHIFT-JIS"):
data.append(b)

print("Patches done. writing to file.")
fname = args.file.name
Expand Down

0 comments on commit da1d320

Please sign in to comment.