mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-30 21:35:41 +00:00
shared: fix parsing aliases for flags in _nm_utils_enum_from_str_full()
Otherwise, the last alias overwrites previous values.
Fixes: b9fa0e0a19
This commit is contained in:
parent
daf4ba43da
commit
3c6bd6769b
|
@ -6531,7 +6531,8 @@ test_nm_utils_enum (void)
|
|||
_test_nm_utils_enum_from_str_do_full (color_flags,
|
||||
"nick-4d,nick-red,nick-5,green,nick-red",
|
||||
TRUE,
|
||||
NM_TEST_GENERAL_COLOR_FLAGS_RED,
|
||||
0x4D
|
||||
| NM_TEST_GENERAL_COLOR_FLAGS_GREEN,
|
||||
NULL,
|
||||
color_value_infos);
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ _nm_utils_enum_from_str_full (GType type,
|
|||
else {
|
||||
nick = _find_value_info (value_infos, s);
|
||||
if (nick)
|
||||
uvalue = (unsigned) nick->value;
|
||||
uvalue |= (unsigned) nick->value;
|
||||
else {
|
||||
ret = FALSE;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue