Skip to content

Commit 1a35d6e

Browse files
committed
Accept two possible arguments for the ADD opcode
1 parent f48138b commit 1a35d6e

File tree

1 file changed

+2
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT PI/win32/library

1 file changed

+2
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ BOOL Validate_SetPreferredAppMode(const BYTE* functionPtr)
234234
(functionPtr[0x06] == 0x87) && (functionPtr[0x07] == 0x0D) && // xchg ecx,dword ptr [uxtheme!g_preferredAppMode]
235235
(functionPtr[0x0C] == 0xC3); // ret
236236
#elif defined(_M_ARM64)
237-
if ((functionPtr[0x10] & 0x1F) == 0x08 && (functionPtr[0x13] & 0x90) == 0x90) // adrp x8,wil::details::g_enabledStateManager+40h
237+
if (*(const DWORD*)(&functionPtr[0x1C]) == 0x912F6100 || // add x0,x8,#0xBD8
238+
*(const DWORD*)(&functionPtr[0x1C]) == 0x912EE100) // add x0,x8,#0xBB8
238239
{
239240
return TRUE;
240241
}

0 commit comments

Comments
 (0)