Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion Source/Misc/LiveDotNet/Editor/LiveDotNet.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/Misc/LiveDotNet/Editor/LiveDotNetConfig.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/Misc/LiveDotNet/PatchReceiver.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/Misc/LiveDotNet/RotateCube.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/UnityProj/Assets/Helloworld/Calc.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/UnityProj/Assets/Helloworld/Editor/HelloworldCfg.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
14 changes: 7 additions & 7 deletions Source/UnityProj/Assets/Helloworld/Helloworld.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Source/UnityProj/Assets/IFix/Editor/Configure.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/UnityProj/Assets/IFix/Editor/ILFixEditor.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/ShuffleInstruction.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Builder/FileVirtualMachineBuilder.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Builder/SimpleVirtualMachineBuilder.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/AnonymousStorey.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/DataDefine.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/GenericDelegate.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/Il2CppSetOptionAttribute.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/Instruction.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/ObjectClone.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/ReflectionMethodInvoker.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/StackOperation.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/SwitchFlags.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/Utils.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
76 changes: 38 additions & 38 deletions Source/VSProj/Src/Core/VirtualMachine.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down Expand Up @@ -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;
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/Core/WrappersManager.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProj/Src/PerfTest/PerfTest.cs
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
Loading