forked from PsychoticNinja/irssi
Use strarray_find instead of g_strv_contains
This commit is contained in:
parent
86c5e56ef4
commit
31f12c10df
@ -387,7 +387,7 @@ gboolean settings_set_choice(const char *key, const char *value)
|
|||||||
|
|
||||||
rec = settings_get_record(key);
|
rec = settings_get_record(key);
|
||||||
/* XXX: The leading/trailing whitespace makes the test fail */
|
/* XXX: The leading/trailing whitespace makes the test fail */
|
||||||
if (rec != NULL && g_strv_contains((const char **)rec->choices, value) == FALSE) {
|
if (rec != NULL && strarray_find(rec->choices, value) < 0) {
|
||||||
char *msg = g_strjoinv(",", rec->choices);
|
char *msg = g_strjoinv(",", rec->choices);
|
||||||
g_warning("Invalid value for '%s', must be one of: %s", key, msg);
|
g_warning("Invalid value for '%s', must be one of: %s", key, msg);
|
||||||
g_free(msg);
|
g_free(msg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user