Update
This commit is contained in:
parent
e6a7ff8c2c
commit
bca4d0d42b
@ -83,12 +83,14 @@ namespace SkinHide.Utils
|
|||||||
{
|
{
|
||||||
ilGen.Emit(OpCodes.Ldarg, i);
|
ilGen.Emit(OpCodes.Ldarg, i);
|
||||||
|
|
||||||
if (!parameterTypes[i].IsValueType)
|
bool isvaluetype = parameterTypes[i].IsValueType;
|
||||||
|
|
||||||
|
if (!isvaluetype)
|
||||||
{
|
{
|
||||||
ilGen.Emit(OpCodes.Castclass, parameterTypes[i]);
|
ilGen.Emit(OpCodes.Castclass, parameterTypes[i]);
|
||||||
}
|
}
|
||||||
// DelegateparameterTypes i == parameterTypes i
|
// DelegateparameterTypes i == parameterTypes i
|
||||||
else if (DelegateparameterTypes[i] == typeof(object) && parameterTypes[i].IsValueType)
|
else if (DelegateparameterTypes[i] == typeof(object) && isvaluetype)
|
||||||
{
|
{
|
||||||
ilGen.Emit(OpCodes.Unbox_Any, parameterTypes[i]);
|
ilGen.Emit(OpCodes.Unbox_Any, parameterTypes[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user