Remove modifiers before checking whether it's pinned
This commit is contained in:
parent
319d0cbadc
commit
0a61af3ce2
|
@ -179,7 +179,7 @@ namespace AssemblyData.methodsrewriter {
|
||||||
void initLocals() {
|
void initLocals() {
|
||||||
locals = new List<LocalBuilder>();
|
locals = new List<LocalBuilder>();
|
||||||
foreach (var local in methodInfo.methodDef.Body.LocalList)
|
foreach (var local in methodInfo.methodDef.Body.LocalList)
|
||||||
locals.Add(ilg.DeclareLocal(Resolver.getRtType(local.Type), local.Type.IsPinned));
|
locals.Add(ilg.DeclareLocal(Resolver.getRtType(local.Type), local.Type.RemoveModifiers().IsPinned));
|
||||||
tempObjLocal = ilg.DeclareLocal(typeof(object));
|
tempObjLocal = ilg.DeclareLocal(typeof(object));
|
||||||
tempObjArrayLocal = ilg.DeclareLocal(typeof(object[]));
|
tempObjArrayLocal = ilg.DeclareLocal(typeof(object[]));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user