Skip to content

Commit 925921c

Browse files
committed
[fix] 修复MonoHook判定processorType时没有正确处理某些CPU上processorType为全大写的情况(如有些机器上返回INTEL而不是Intel)
1 parent 64a6d26 commit 925921c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Editor/3rds/UnityHook/HookUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static string HexToString(void* ptr, int size, int offset = 0)
117117
static void SetupFlushICacheFunc()
118118
{
119119
string processorType = SystemInfo.processorType;
120-
if (processorType.Contains("Intel") || processorType.Contains("AMD"))
120+
if (processorType.Contains("Intel", StringComparison.InvariantCultureIgnoreCase) || processorType.Contains("AMD", StringComparison.InvariantCultureIgnoreCase))
121121
return;
122122

123123
if (IntPtr.Size == 4)

0 commit comments

Comments
 (0)