InjectFix
InjectFix copied to clipboard
Init `out struct` parameters to prevent NullReferenceException
Reason:
https://github.com/Tencent/InjectFix/blob/552da3654e74c4b08bbe2533699fb2306df5de7e/Source/VSProj/Src/Core/StackOperation.cs#L256-L260
Known issue, but never fixed😅
Test case:
public struct TestStruct
{
public int a;
public string b;
}
[Patch]
public void TestOutStruct(out TestStruct ts)
{
ts.a = 114514;
ts.b = "buggy IFix";
}
public void Awake() // must not be [Patch]ed
{
TestStruct ts;
TestOutStruct(out ts);
}
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.