clugh / coc-patcher

A small utility to patch and sign the Clash of Clans APK
15 stars 9 forks source link

libg.so for arm check is incorrect #5

Closed HorridModz closed 1 year ago

HorridModz commented 1 year ago

Hey, I know this is old, and IDK it if still works. However, I was curious about it, so I read through the code. When I was reading through it, I noticed a mistake:

This code checks that the x86 and arm versions of libg.so are not missing:

if not os.path.isfile(LIBG_X86):
    print('ERROR: arm libg.so is missing.', file=sys.stderr)
    sys.exit(1)

if not os.path.isfile(LIBG_X86):
    print('ERROR: x86 libg.so is missing.', file=sys.stderr)
    sys.exit(1)

But this code has a mistake: The check for the arm version of ligb.so actually checks for the x86 version.

Here's the fixed version:

if not os.path.isfile(LIBG_ARM):
    print('ERROR: arm libg.so is missing.', file=sys.stderr)
    sys.exit(1)

if not os.path.isfile(LIBG_X86):
    print('ERROR: x86 libg.so is missing.', file=sys.stderr)
    sys.exit(1)
HorridModz commented 1 year ago

I'm stupid, I should just make a pull request...