forked from enlightenment/efl
elm config - fix eina value setting to check get return
fix CID 1357139
This commit is contained in:
parent
246d8dbda5
commit
6f9857ccab
|
@ -4519,11 +4519,13 @@ _efl_config_global_efl_config_config_set(Eo *obj EINA_UNUSED, void *_pd EINA_UNU
|
|||
if (eina_value_type_get(val) == EINA_VALUE_TYPE_STRING) \
|
||||
{ \
|
||||
const char *str; \
|
||||
eina_value_get(val, &str); \
|
||||
if (eina_value_get(val, &str)) \
|
||||
{ \
|
||||
for (unsigned i = 0; i < (sizeof(_enum_map_ ## opt) / sizeof(_enum_map_ ## opt[0])); i++) \
|
||||
{ \
|
||||
if (eina_streq(_enum_map_ ## opt[i].str, str)) { v = _enum_map_ ## opt[i].val; break; } \
|
||||
} \
|
||||
} \
|
||||
if (v == -1) \
|
||||
{ \
|
||||
ERR("Invalid value for config '%s' (got '%s')", #opt, str); \
|
||||
|
|
Loading…
Reference in New Issue