From 3631f131adb580bae59dfaf3891b5124cc5901f5 Mon Sep 17 00:00:00 2001 From: walon Date: Wed, 16 Feb 2022 09:58:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E5=AF=B9?= =?UTF-8?q?=E4=BA=8Eflags=E7=B1=BB=E5=9E=8Benum=EF=BC=8C=E5=A1=AB=E6=95=B4?= =?UTF-8?q?=E6=95=B0=E5=80=BC=E6=97=B6=E4=B8=8D=E5=86=8D=E8=A6=81=E6=B1=82?= =?UTF-8?q?=E6=98=AF=E6=9E=9A=E4=B8=BE=E5=80=BC=E4=B8=AD=E6=9F=90=E4=B8=80?= =?UTF-8?q?=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Luban.Job.Common/Source/Defs/DefEnum.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Luban.Job.Common/Source/Defs/DefEnum.cs b/src/Luban.Job.Common/Source/Defs/DefEnum.cs index ffbf152..d8f4e8b 100644 --- a/src/Luban.Job.Common/Source/Defs/DefEnum.cs +++ b/src/Luban.Job.Common/Source/Defs/DefEnum.cs @@ -79,7 +79,7 @@ namespace Luban.Job.Common.Defs } else if (int.TryParse(name, out value)) { - if (!_vaule2Name.ContainsKey(value)) + if (!_vaule2Name.ContainsKey(value) && !IsFlags) { throw new Exception($"{value} 不是 enum:'{FullName}'的有效枚举值"); }