diff --git a/Harmony/Public/CodeInstruction.cs b/Harmony/Public/CodeInstruction.cs index 616f3fcd..c910803a 100644 --- a/Harmony/Public/CodeInstruction.cs +++ b/Harmony/Public/CodeInstruction.cs @@ -168,7 +168,7 @@ public static CodeInstruction CallClosure(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), "Item")); }