diff --git a/LICENSE b/LICENSE index 2b192e9..b9b43f8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Tencent is pleased to support the open source community by making InjectFix available. -Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. +Copyright (C) 2019 Tencent. All rights reserved. InjectFix is licensed under the MIT License, except for the third-party components listed below which may be subject to thier corresponding license terms. diff --git a/Source/Misc/LiveDotNet/Editor/LiveDotNet.cs b/Source/Misc/LiveDotNet/Editor/LiveDotNet.cs index 164a819..da3acdb 100644 --- a/Source/Misc/LiveDotNet/Editor/LiveDotNet.cs +++ b/Source/Misc/LiveDotNet/Editor/LiveDotNet.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/Misc/LiveDotNet/Editor/LiveDotNetConfig.cs b/Source/Misc/LiveDotNet/Editor/LiveDotNetConfig.cs index 1c74cb5..a638cd9 100644 --- a/Source/Misc/LiveDotNet/Editor/LiveDotNetConfig.cs +++ b/Source/Misc/LiveDotNet/Editor/LiveDotNetConfig.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/Misc/LiveDotNet/PatchReceiver.cs b/Source/Misc/LiveDotNet/PatchReceiver.cs index 2b4c565..f13aaae 100644 --- a/Source/Misc/LiveDotNet/PatchReceiver.cs +++ b/Source/Misc/LiveDotNet/PatchReceiver.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/Misc/LiveDotNet/RotateCube.cs b/Source/Misc/LiveDotNet/RotateCube.cs index 9672d75..cdabd21 100644 --- a/Source/Misc/LiveDotNet/RotateCube.cs +++ b/Source/Misc/LiveDotNet/RotateCube.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/UnityProj/Assets/Helloworld/Calc.cs b/Source/UnityProj/Assets/Helloworld/Calc.cs index 4d6bb5e..d92ac12 100644 --- a/Source/UnityProj/Assets/Helloworld/Calc.cs +++ b/Source/UnityProj/Assets/Helloworld/Calc.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/UnityProj/Assets/Helloworld/Editor/HelloworldCfg.cs b/Source/UnityProj/Assets/Helloworld/Editor/HelloworldCfg.cs index 8651e8b..3af5f17 100644 --- a/Source/UnityProj/Assets/Helloworld/Editor/HelloworldCfg.cs +++ b/Source/UnityProj/Assets/Helloworld/Editor/HelloworldCfg.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/UnityProj/Assets/Helloworld/Helloworld.cs b/Source/UnityProj/Assets/Helloworld/Helloworld.cs index 9fc99ad..cf17496 100644 --- a/Source/UnityProj/Assets/Helloworld/Helloworld.cs +++ b/Source/UnityProj/Assets/Helloworld/Helloworld.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ @@ -50,16 +50,16 @@ void test() var anotherClass = new AnotherClass(1); //AnotherClass in Assembly-CSharp-firstpass.dll var ret = anotherClass.Call(i => i + 1); - UnityEngine.Debug.Log("anotherClass.Call, ret = " + ret); - - //test for InjectFix/Fix(Android) InjectFix/Fix(IOS) Menu for unity 2018.3 or newer + UnityEngine.Debug.Log("anotherClass.Call, ret = " + ret); + + //test for InjectFix/Fix(Android) InjectFix/Fix(IOS) Menu for unity 2018.3 or newer #if UNITY_2018_3_OR_NEWER #if UNITY_IOS UnityEngine.Debug.Log("UNITY_IOS"); -#endif +#endif #if UNITY_EDITOR - UnityEngine.Debug.Log("UNITY_EDITOR"); -#endif + UnityEngine.Debug.Log("UNITY_EDITOR"); +#endif #if UNITY_ANDROID UnityEngine.Debug.Log("UNITY_ANDROID"); #endif diff --git a/Source/UnityProj/Assets/IFix/Editor/Configure.cs b/Source/UnityProj/Assets/IFix/Editor/Configure.cs index 5c6190a..6b033e8 100644 --- a/Source/UnityProj/Assets/IFix/Editor/Configure.cs +++ b/Source/UnityProj/Assets/IFix/Editor/Configure.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/UnityProj/Assets/IFix/Editor/ILFixEditor.cs b/Source/UnityProj/Assets/IFix/Editor/ILFixEditor.cs index 402c054..ab14aa5 100644 --- a/Source/UnityProj/Assets/IFix/Editor/ILFixEditor.cs +++ b/Source/UnityProj/Assets/IFix/Editor/ILFixEditor.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/UnityProj/Assets/Pro Standard Assets/AnotherClass.cs b/Source/UnityProj/Assets/Pro Standard Assets/AnotherClass.cs index 15ae8e9..4b0d42a 100644 --- a/Source/UnityProj/Assets/Pro Standard Assets/AnotherClass.cs +++ b/Source/UnityProj/Assets/Pro Standard Assets/AnotherClass.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/ShuffleInstruction.cs b/Source/VSProj/ShuffleInstruction.cs index aafb25b..73e02c2 100644 --- a/Source/VSProj/ShuffleInstruction.cs +++ b/Source/VSProj/ShuffleInstruction.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Builder/FileVirtualMachineBuilder.cs b/Source/VSProj/Src/Builder/FileVirtualMachineBuilder.cs index 400c853..c960641 100644 --- a/Source/VSProj/Src/Builder/FileVirtualMachineBuilder.cs +++ b/Source/VSProj/Src/Builder/FileVirtualMachineBuilder.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Builder/SimpleVirtualMachineBuilder.cs b/Source/VSProj/Src/Builder/SimpleVirtualMachineBuilder.cs index 6641591..f7273c0 100644 --- a/Source/VSProj/Src/Builder/SimpleVirtualMachineBuilder.cs +++ b/Source/VSProj/Src/Builder/SimpleVirtualMachineBuilder.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/AnonymousStorey.cs b/Source/VSProj/Src/Core/AnonymousStorey.cs index 341f90e..646883b 100644 --- a/Source/VSProj/Src/Core/AnonymousStorey.cs +++ b/Source/VSProj/Src/Core/AnonymousStorey.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/DataDefine.cs b/Source/VSProj/Src/Core/DataDefine.cs index 140117b..5e9830c 100644 --- a/Source/VSProj/Src/Core/DataDefine.cs +++ b/Source/VSProj/Src/Core/DataDefine.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/GenericDelegate.cs b/Source/VSProj/Src/Core/GenericDelegate.cs index f41d382..72c70b5 100644 --- a/Source/VSProj/Src/Core/GenericDelegate.cs +++ b/Source/VSProj/Src/Core/GenericDelegate.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/Il2CppSetOptionAttribute.cs b/Source/VSProj/Src/Core/Il2CppSetOptionAttribute.cs index 931c3e0..3554fd1 100644 --- a/Source/VSProj/Src/Core/Il2CppSetOptionAttribute.cs +++ b/Source/VSProj/Src/Core/Il2CppSetOptionAttribute.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/Instruction.cs b/Source/VSProj/Src/Core/Instruction.cs index cfe8843..0c7ef34 100644 --- a/Source/VSProj/Src/Core/Instruction.cs +++ b/Source/VSProj/Src/Core/Instruction.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/ObjectClone.cs b/Source/VSProj/Src/Core/ObjectClone.cs index 76d193b..646dbc7 100644 --- a/Source/VSProj/Src/Core/ObjectClone.cs +++ b/Source/VSProj/Src/Core/ObjectClone.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/ReflectionMethodInvoker.cs b/Source/VSProj/Src/Core/ReflectionMethodInvoker.cs index 2de7441..f4a6a52 100644 --- a/Source/VSProj/Src/Core/ReflectionMethodInvoker.cs +++ b/Source/VSProj/Src/Core/ReflectionMethodInvoker.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/StackOperation.cs b/Source/VSProj/Src/Core/StackOperation.cs index 541d55c..083067b 100644 --- a/Source/VSProj/Src/Core/StackOperation.cs +++ b/Source/VSProj/Src/Core/StackOperation.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/SwitchFlags.cs b/Source/VSProj/Src/Core/SwitchFlags.cs index b93d1a2..93e5a50 100644 --- a/Source/VSProj/Src/Core/SwitchFlags.cs +++ b/Source/VSProj/Src/Core/SwitchFlags.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/Utils.cs b/Source/VSProj/Src/Core/Utils.cs index 746451b..370b98c 100644 --- a/Source/VSProj/Src/Core/Utils.cs +++ b/Source/VSProj/Src/Core/Utils.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Core/VirtualMachine.cs b/Source/VSProj/Src/Core/VirtualMachine.cs index 128099a..351cac6 100644 --- a/Source/VSProj/Src/Core/VirtualMachine.cs +++ b/Source/VSProj/Src/Core/VirtualMachine.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ @@ -1626,43 +1626,43 @@ public static void _Info(string a) var obj = managedStack[ptr->Value1]; ptr->Type = ValueType.Object; ptr->Value1 = pos; - if (obj == null) - { - managedStack[pos] = null; - } - else - { - bool canAssign = type.IsAssignableFrom(obj.GetType()); - managedStack[pos] = canAssign - ? obj : null; - if (pc->Operand < 0 && canAssign) - { - if ((obj is AnonymousStorey) && (obj as AnonymousStorey).typeId != -(pc->Operand + 1)) - { - var fromInfo = anonymousStoreyInfos[(obj as AnonymousStorey).typeId]; - var targetInfo = anonymousStoreyInfos[-(pc->Operand + 1)]; - - if (fromInfo.Slots != null && targetInfo.Slots != null && fromInfo.Slots.Length == targetInfo.Slots.Length) - { - for (int i = 0; i < fromInfo.Slots.Length; ++i) - { - if (fromInfo.Slots[i] != targetInfo.Slots[i]) - { - canAssign = false; - break; - } - } - } - else - { - canAssign = false; - } - - if (!canAssign) - { - managedStack[pos] = null; - } - } + if (obj == null) + { + managedStack[pos] = null; + } + else + { + bool canAssign = type.IsAssignableFrom(obj.GetType()); + managedStack[pos] = canAssign + ? obj : null; + if (pc->Operand < 0 && canAssign) + { + if ((obj is AnonymousStorey) && (obj as AnonymousStorey).typeId != -(pc->Operand + 1)) + { + var fromInfo = anonymousStoreyInfos[(obj as AnonymousStorey).typeId]; + var targetInfo = anonymousStoreyInfos[-(pc->Operand + 1)]; + + if (fromInfo.Slots != null && targetInfo.Slots != null && fromInfo.Slots.Length == targetInfo.Slots.Length) + { + for (int i = 0; i < fromInfo.Slots.Length; ++i) + { + if (fromInfo.Slots[i] != targetInfo.Slots[i]) + { + canAssign = false; + break; + } + } + } + else + { + canAssign = false; + } + + if (!canAssign) + { + managedStack[pos] = null; + } + } } } } diff --git a/Source/VSProj/Src/Core/WrappersManager.cs b/Source/VSProj/Src/Core/WrappersManager.cs index f087ec0..c92eed0 100644 --- a/Source/VSProj/Src/Core/WrappersManager.cs +++ b/Source/VSProj/Src/Core/WrappersManager.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/PerfTest/PerfTest.cs b/Source/VSProj/Src/PerfTest/PerfTest.cs index c54524f..2dfbe97 100644 --- a/Source/VSProj/Src/PerfTest/PerfTest.cs +++ b/Source/VSProj/Src/PerfTest/PerfTest.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/TestDLL/BaseTest.cs b/Source/VSProj/Src/TestDLL/BaseTest.cs index 8b784b5..85f19ce 100644 --- a/Source/VSProj/Src/TestDLL/BaseTest.cs +++ b/Source/VSProj/Src/TestDLL/BaseTest.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/TestDLL/RedirectBaseTest.cs b/Source/VSProj/Src/TestDLL/RedirectBaseTest.cs index 54912ac..836cd84 100644 --- a/Source/VSProj/Src/TestDLL/RedirectBaseTest.cs +++ b/Source/VSProj/Src/TestDLL/RedirectBaseTest.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Tools/CSFix.cs b/Source/VSProj/Src/Tools/CSFix.cs index cf2721f..615814b 100644 --- a/Source/VSProj/Src/Tools/CSFix.cs +++ b/Source/VSProj/Src/Tools/CSFix.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Tools/CecilExtensions.cs b/Source/VSProj/Src/Tools/CecilExtensions.cs index bc9691b..5c278ef 100644 --- a/Source/VSProj/Src/Tools/CecilExtensions.cs +++ b/Source/VSProj/Src/Tools/CecilExtensions.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Tools/CodeTranslator.cs b/Source/VSProj/Src/Tools/CodeTranslator.cs index 104bc51..2d50d9e 100644 --- a/Source/VSProj/Src/Tools/CodeTranslator.cs +++ b/Source/VSProj/Src/Tools/CodeTranslator.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ @@ -1137,6 +1137,15 @@ unsafe MethodIdInfo getMethodId(MethodReference callee, MethodDefinition caller, }; } + if (method.IsSpecialName && (method.IsAddOn || method.IsRemoveOn || method.IsGetter || method.IsSetter) && !isNewMethod(method) && !isNewClass(method.DeclaringType) && isCompilerGenerated(method)) + { + return new MethodIdInfo() + { + Id = addExternMethod(callee, caller), + Type = CallType.Extern + }; + } + if (method.Parameters.Any(p => p.ParameterType.IsPointer) || method.ReturnType.IsPointer) { Console.WriteLine("Warning: unsafe method, " + method + " in " + method.DeclaringType); diff --git a/Source/VSProj/Src/Tools/GenerateConfigure.cs b/Source/VSProj/Src/Tools/GenerateConfigure.cs index 68e6f7a..3fe8915 100644 --- a/Source/VSProj/Src/Tools/GenerateConfigure.cs +++ b/Source/VSProj/Src/Tools/GenerateConfigure.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/UnitTest/VirtualMachineTest.cs b/Source/VSProj/Src/UnitTest/VirtualMachineTest.cs index 4f44926..4a5ebf5 100644 --- a/Source/VSProj/Src/UnitTest/VirtualMachineTest.cs +++ b/Source/VSProj/Src/UnitTest/VirtualMachineTest.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ diff --git a/Source/VSProj/Src/Version.cs b/Source/VSProj/Src/Version.cs index 1f96567..fa127ec 100644 --- a/Source/VSProj/Src/Version.cs +++ b/Source/VSProj/Src/Version.cs @@ -1,6 +1,6 @@ /* * Tencent is pleased to support the open source community by making InjectFix available. - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2019 Tencent. All rights reserved. * InjectFix is licensed under the MIT License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */