binary.py: Avoid bin patching multiple times

This commit is contained in:
Mykola Grymalyuk
2022-05-11 20:00:30 -06:00
parent 78355c2c5a
commit a7a3643b12
3 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ def patch_load_command():
replace = b'\x00\x0A\x0A\x00' # 10.10 (0xA0A)
with open(path, 'rb') as f:
data = f.read()
data = data.replace(find, replace)
data = data.replace(find, replace, 1)
with open(path, 'wb') as f:
f.write(data)