Convert managed bool to byte in detour

This commit is contained in:
Kasuromi committed 2022-03-15 17:35:58 +02:00
1 parent b7a05a61e1
commit bf7b059145
1 file changed
+3
@@ -333,6 +333,9 @@ public unsafe class IL2CPPDetourMethodPatcher : MethodPatcher
) // General reference type
{
return typeof(IntPtr);
} else if(managedType == typeof(bool)) {
// bool is byte in Il2Cpp, but int in CLR => force size to be correct
return typeof(byte);
}
return managedType;