This commit is contained in:
kmyuhkyuk 2022-10-19 10:52:25 +08:00
parent fc0a11fd65
commit ddc6db59a1

View File

@ -85,14 +85,14 @@ namespace SkinHide.Utils
Type parameterType = parameterTypes[i];
bool isvaluetype = parameterType.IsValueType;
bool isValueType = parameterType.IsValueType;
if (!isvaluetype)
if (!isValueType)
{
ilGen.Emit(OpCodes.Castclass, parameterType);
}
//DelegateparameterTypes i == parameterTypes i
else if (delegateParameterTypes[i] == typeof(object) && isvaluetype)
else if (delegateParameterTypes[i] == typeof(object) && isValueType)
{
ilGen.Emit(OpCodes.Unbox_Any, parameterType);
}