Skip to content

Commit

Permalink
uses correct field type for closureCache
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike authored Dec 28, 2024
1 parent 6553f24 commit 22959ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Harmony/Public/CodeInstruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public static CodeInstruction CallClosure<T>(T closure) where T : Delegate
{
var n = State.closureCache.Count;
State.closureCache[n] = closure;
il.Emit(OpCodes.Ldsfld, AccessTools.Field(typeof(Transpilers), nameof(State.closureCache)));
il.Emit(OpCodes.Ldsfld, AccessTools.Field(typeof(State), nameof(State.closureCache)));
il.Emit(OpCodes.Ldc_I4, n);
il.Emit(OpCodes.Callvirt, AccessTools.PropertyGetter(typeof(Dictionary<int, Delegate>), "Item"));
}
Expand Down

0 comments on commit 22959ce

Please sign in to comment.