mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-04 02:47:22 +00:00
Revert "proxy injector: ctors already have void return type"
This reverts commit e9e448cbdc
.
This commit is contained in:
parent
8e04eca8bc
commit
19d8a978a3
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user