From 19d8a978a3a5f0257efbe8eb7bbac9970defc917 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sun, 13 Feb 2022 17:51:53 -0800 Subject: [PATCH] Revert "proxy injector: ctors already have void return type" This reverts commit e9e448cbdc4092d0ca1476cca69d5c815b4a42cb. --- ProxyInjector/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProxyInjector/Program.cs b/ProxyInjector/Program.cs index 4c711ddd..d3e0591b 100644 --- a/ProxyInjector/Program.cs +++ b/ProxyInjector/Program.cs @@ -41,7 +41,7 @@ namespace ProxyInjector var proxyTd = new TypeDefinition(td.Namespace, "PROXY_" + td.Name, td.Attributes, qsbModule.ImportReference(td)); var ctor = td.Methods.First(md => md.Name == ".ctor" && !md.HasParameters); - var proxyCtor = new MethodDefinition(ctor.Name, ctor.Attributes, qsbModule.TypeSystem.Void); + var proxyCtor = new MethodDefinition(ctor.Name, ctor.Attributes, qsbModule.ImportReference(ctor.ReturnType)); proxyCtor.Body = new MethodBody(proxyCtor); proxyCtor.Body.Instructions.Add(Instruction.Create(OpCodes.Ldarg_0)); proxyCtor.Body.Instructions.Add(Instruction.Create(OpCodes.Call, qsbModule.ImportReference(ctor)));