Enum : UInt32 的参数类型,在Patch的时候,在某些主机上挂了
Condition=OverflowException: Value was either too large or too small for an Int32. StackTrace= System.Convert.ToInt32 (System.UInt32 value) (at <00000000000000000000000000000000>:0) IFix.Core.EvaluationStackOperation.PushObject (IFix.Core.Value* evaluationStackBase, IFix.Core.Value* evaluationStackPointer, System.Object[] managedStack, System.Object obj, System.Type type) (at <00000000000000000000000000000000>:0) IFix.Core.EvaluationStackOperation.UpdateReference (IFix.Core.Value* evaluationStackBase, IFix.Core.Value* evaluationStackPointer, System.Object[] managedStack, System.Object obj, IFix.Core.VirtualMachine virtualMachine, System.Type type) (at <00000000000000000000000000000000>:0) IFix.Core.Call.UpdateReference (System.Int32 offset, System.Object obj, IFix.Core.VirtualMachine virtualMachine, System.Type type) (at <00000000000000000000000000000000>:0) IFix.Core.ReflectionMethodInvoker.Invoke (IFix.Core.VirtualMachine virtualMachine, IFix.Core.Call& call, System.Boolean isInstantiate) (at <00000000000000000000000000000000>:0) IFix.Core.ExternInvoker.Invoke (IFix.Core.VirtualMachine vm, IFix.Core.Call& call, System.Boolean isInstantiate) (at <00000000000000000000000000000000>:0) IFix.Core.VirtualMachine.Execute (IFix.Core.Instruction* pc, IFix.Core.Value* argumentBase, System.Object[] managedStack, IFix.Core.Value* evaluationStackBase, System.Int32 argsCount, System.Int32 methodIndex, System.Int32 refCount, IFix.Core.Value** topWriteBack) (at <00000000000000000000000000000000>:0) IFix.Core.VirtualMachine.Execute (System.Int32 methodIndex, IFix.Core.Call& call, System.Int32 argsCount, System.Int32 refCount) (at <00000000000000000000000000000000>:0) IFix.ILFixDynamicMethodWrapper.__Gen_Wrap_1741 (System.Object P0, Microsoft.Xbox.XblPrivilegeType P1, System.Boolean& P2) (at <00000000000000000000000000000000>:0)
报错堆栈,我自己的Xbox开发机不能复现,但是一些玩家的机器出现了。看了一下,InjectFix会把Enum转成Int32,然后超过了上限。但是我的枚举值都很小,都在1000左右。
哪位大佬知道问题在哪?
public enum XUserPrivilege : UInt32
{
CrossPlay = 185,
Clubs = 188,
}
枚举类型大概是这样的。