Don't cast the arg to its correct type

This commit is contained in:
de4dot 2011-12-11 11:54:02 +01:00
parent 00f7b7feda
commit 0bf74e5196

View File

@ -296,8 +296,13 @@ namespace AssemblyData.methodsrewriter {
var argType = mparams[j];
if (argType.IsValueType)
block.insert(n++, Instruction.Create(OpCodes.Unbox_Any, argType));
else
block.insert(n++, Instruction.Create(OpCodes.Castclass, argType));
else {
// Don't cast it to its correct type. This will sometimes cause
// an exception in some EF obfuscated assembly since we'll be
// trying to cast a System.Reflection.AssemblyName type to some
// other type.
// block.insert(n++, Instruction.Create(OpCodes.Castclass, argType));
}
}
}