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