Update patch.py

Signed-off-by: elseif <elseif@live.cn>
This commit is contained in:
elseif 2025-06-18 18:33:59 +08:00 committed by GitHub
parent a350e2badd
commit 6cd71c9efe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -283,12 +283,12 @@ def patch_kernel(data:bytes,key_dict):
def patch_loader(loader_file):
try:
from loader import patch_loader
from loader.patch_loader import patch_loader as do_patch_loader
if 'ARCH' in os.environ and os.environ['ARCH'] == '-arm64':
arch = 'arm64'
else:
arch = 'x86'
patch_loader(loader_file,loader_file,arch)
do_patch_loader(loader_file,loader_file,arch)
except ImportError:
print("loader module not found. cannot run patch_loader.py")