From cac828efefe8e9b56c7668f87426bbbdb6414703 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Thu, 26 Mar 2020 16:31:09 -0500 Subject: [PATCH] Fixed null `thisarg` being passed around in config generator --- IPA.Loader/Config/Stores/GeneratedStoreImpl/MakeCreator.cs | 2 +- IPA.Loader/Config/Stores/GeneratedStoreImpl/Serialization.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IPA.Loader/Config/Stores/GeneratedStoreImpl/MakeCreator.cs b/IPA.Loader/Config/Stores/GeneratedStoreImpl/MakeCreator.cs index 3b584f15..9ded5ca5 100644 --- a/IPA.Loader/Config/Stores/GeneratedStoreImpl/MakeCreator.cs +++ b/IPA.Loader/Config/Stores/GeneratedStoreImpl/MakeCreator.cs @@ -368,7 +368,7 @@ namespace IPA.Config.Stores foreach (var member in structure) { - EmitSerializeMember(il, member, GetLocal); + EmitSerializeMember(il, member, GetLocal, GetMethodThis); il.Emit(OpCodes.Stloc, valLocal); il.Emit(OpCodes.Ldloc, mapLocal); il.Emit(OpCodes.Ldstr, member.Name); diff --git a/IPA.Loader/Config/Stores/GeneratedStoreImpl/Serialization.cs b/IPA.Loader/Config/Stores/GeneratedStoreImpl/Serialization.cs index 81bfb3b0..e8ac69dd 100644 --- a/IPA.Loader/Config/Stores/GeneratedStoreImpl/Serialization.cs +++ b/IPA.Loader/Config/Stores/GeneratedStoreImpl/Serialization.cs @@ -18,7 +18,7 @@ namespace IPA.Config.Stores internal static partial class GeneratedStoreImpl { // emit takes no args, leaves Value at top of stack - private static void EmitSerializeMember(ILGenerator il, SerializedMemberInfo member, GetLocal GetLocal, Action thisarg = null) + private static void EmitSerializeMember(ILGenerator il, SerializedMemberInfo member, GetLocal GetLocal, Action thisarg) { EmitLoad(il, member, thisarg);