Skip to content

Commit

Permalink
Ignore custom modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Oct 21, 2017
1 parent 03d0a04 commit 0f34b3e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ string GetName(Local l) {
var methodSig = new MethodSig(callConv, sourceMethod.MethodSig.GenParamCount);
methodSig.RetType = generatedModule.Import(type.RemovePinnedAndModifiers());
if (methodSig.RetType.IsByRef)
methodSig.RetType = methodSig.RetType.Next;
methodSig.RetType = methodSig.RetType.Next.RemovePinnedAndModifiers();

if (lastMethodSig != null) {
foreach (var p in lastMethodSig.Params)
Expand Down Expand Up @@ -168,7 +168,7 @@ string GetName(Local l) {
}
body.Instructions.Add(CreateLoadVariable(method, body.Variables, index, isLocal));
if (type.RemovePinnedAndModifiers().GetElementType() == ElementType.ByRef)
body.Instructions.Add(LoadIndirect(type.RemovePinnedAndModifiers().Next));
body.Instructions.Add(LoadIndirect(type.RemovePinnedAndModifiers().Next.RemovePinnedAndModifiers()));
body.Instructions.Add(Instruction.Create(OpCodes.Ret));

lastMethodSig = methodSig;
Expand Down

0 comments on commit 0f34b3e

Please sign in to comment.