From c805fc56b3102639a6a17e3e2334bcf6456a8cc6 Mon Sep 17 00:00:00 2001 From: cocay Date: Thu, 14 Dec 2023 10:37:56 +0700 Subject: [PATCH] fix: check cputype --- macho-go/pkg/ios/macho/edit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macho-go/pkg/ios/macho/edit.go b/macho-go/pkg/ios/macho/edit.go index 8ee12a9..5affe01 100644 --- a/macho-go/pkg/ios/macho/edit.go +++ b/macho-go/pkg/ios/macho/edit.go @@ -472,7 +472,7 @@ func (mc *MachoContext) ReworkForObjc() { main_offset := int(mc.entryoff) var shellcode_offset int - if mc.header.cputype == 12{ + if (mc.header.cputype & 0xff) == 12{ shellcode = []uint32{ 0x10000008, 0, // x9 = (offset end of __DATA) - (offset shellcode)