EnumHelper.split_flags requires all bits to match and be non-zero
This commit is contained in:
1 parent
76cc77485a
commit
8ef97d012a
1 file changed
+2
-1
@@ -79,7 +79,8 @@ namespace mbts.ui.utility {
|
||||
long lflags = Convert.ToInt64(flags);
|
||||
foreach (TEnum e in get_values<TEnum>()) {
|
||||
long lval = Convert.ToInt64(e);
|
||||
if ((lval & lflags)!= 0)
|
||||
long common_bits = lval & lflags;
|
||||
if (common_bits != 0 && common_bits == lval)
|
||||
yield return e;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user