Forgot to add this check to fastPathSign

This commit is contained in:
alfiecg24 2024-02-09 19:58:29 +00:00
parent 3913abfd8d
commit 09957974ba
1 changed files with 10 additions and 4 deletions

View File

@ -6,6 +6,8 @@
#include "Host.h" #include "Host.h"
#include <copyfile.h> #include <copyfile.h>
#define CPU_SUBTYPE_ARM64E_ABI_V2 0x80000000
char *extract_preferred_slice(const char *fatPath) char *extract_preferred_slice(const char *fatPath)
{ {
FAT *fat = fat_init_from_path(fatPath); FAT *fat = fat_init_from_path(fatPath);
@ -19,6 +21,9 @@ char *extract_preferred_slice(const char *fatPath)
if (!macho) { if (!macho) {
// If that fails, check for regular arm64 // If that fails, check for regular arm64
macho = fat_find_slice(fat, CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64_ALL); macho = fat_find_slice(fat, CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64_ALL);
if (!macho) {
// If that fails, check for arm64e with ABI v2
macho = fat_find_slice(fat, CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64E | CPU_SUBTYPE_ARM64E_ABI_V2);
if (!macho) { if (!macho) {
// If that fails, check for arm64e // If that fails, check for arm64e
macho = fat_find_slice(fat, CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64E); macho = fat_find_slice(fat, CPU_TYPE_ARM64, CPU_SUBTYPE_ARM64E);
@ -29,6 +34,7 @@ char *extract_preferred_slice(const char *fatPath)
} }
} }
} }
}
#else #else
if (!macho) { if (!macho) {
fat_free(fat); fat_free(fat);