diff --git a/ICD.Common.Utils/EnumUtils.cs b/ICD.Common.Utils/EnumUtils.cs index e01c450..9de5d1e 100644 --- a/ICD.Common.Utils/EnumUtils.cs +++ b/ICD.Common.Utils/EnumUtils.cs @@ -352,10 +352,11 @@ namespace ICD.Common.Utils /// public static IEnumerable GetFlags(Type type, object value) { - return s_EnumFlagsCacheSection.Execute(() => s_EnumFlagsCache.GetOrAddNew(type, () => new Dictionary()) - .GetOrAddNew(value, () => GetValues(type) - .Where(f => HasFlag(value, f)) - .ToArray())); + return s_EnumFlagsCacheSection.Execute(() => s_EnumFlagsCache + .GetOrAddNew(type, () => new Dictionary()) + .GetOrAddNew(value, () => GetValues(type) + .Where(f => !HasMultipleFlags((int)f) && HasFlag(value, f)) + .ToArray())); } ///