Browse Source
Update patch.py
Signed-off-by: elseif <elseif@live.cn>
pull/110/head
elseif
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
patch.py
|
|
@ -18,7 +18,7 @@ def replace_key(old,new,data,name=''): |
|
|
old_chunks = [old[i:i+4] for i in range(0, len(old), 4)] |
|
|
old_chunks = [old[i:i+4] for i in range(0, len(old), 4)] |
|
|
new_chunks = [new[i:i+4] for i in range(0, len(new), 4)] |
|
|
new_chunks = [new[i:i+4] for i in range(0, len(new), 4)] |
|
|
data = replace_chunks(old_chunks, new_chunks, data,name) |
|
|
data = replace_chunks(old_chunks, new_chunks, data,name) |
|
|
if os.environ['ARCH'] == '-arm64' and os.environ['LATEST_VERSION'] == '7.17.2': |
|
|
|
|
|
|
|
|
if 'ARCH' in os.environ and os.environ['ARCH'] == '-arm64' and os.environ['LATEST_VERSION'] == '7.17.2': |
|
|
old_bytes = old_chunks[4] + old_chunks[5] + old_chunks[2] + old_chunks[0] + old_chunks[1] + old_chunks[6] + old_chunks[7] |
|
|
old_bytes = old_chunks[4] + old_chunks[5] + old_chunks[2] + old_chunks[0] + old_chunks[1] + old_chunks[6] + old_chunks[7] |
|
|
new_bytes = new_chunks[4] + new_chunks[5] + new_chunks[2] + new_chunks[0] + new_chunks[1] + new_chunks[6] + new_chunks[7] |
|
|
new_bytes = new_chunks[4] + new_chunks[5] + new_chunks[2] + new_chunks[0] + new_chunks[1] + new_chunks[6] + new_chunks[7] |
|
|
if old_bytes in data: |
|
|
if old_bytes in data: |
|
|
|