InjectFix icon indicating copy to clipboard operation
InjectFix copied to clipboard

Fix event add/remove, Fix #149

Open UlyssesWu opened this issue 6 months ago • 1 comments

This PR fixes #149 .

event Action iFix;

[IFix.Patch]
public void Test() {
	Action bug = () => Debug.Log("Full of bugs");
	iFix += bug;
}

Expect: Nothing was wrong.

Actual: ExecutionEngineException: Attempting to call method 'System.Threading.Interlocked::CompareExchange<...>' for which no ahead of time (AOT) code was generated.

Wrong explaination: image

Correct explaination: image

By using, referring or merging this pull request, you understand and agree that the copyright or patent license of this pull request and its code will not be granted to Tencent.

UlyssesWu avatar Jul 08 '25 14:07 UlyssesWu

CLA assistant check
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.

tencent-adm avatar Jul 08 '25 14:07 tencent-adm