diff --git a/src/utils/fluid_settings.c b/src/utils/fluid_settings.c index d77d5ed7..02be9a03 100644 --- a/src/utils/fluid_settings.c +++ b/src/utils/fluid_settings.c @@ -1733,7 +1733,6 @@ fluid_settings_option_concat(fluid_settings_t *settings, const char *name, const char *separator) { fluid_setting_node_t *node; - fluid_str_setting_t *setting; fluid_list_t *p, *newlist = NULL; size_t count, len; char *str, *option; @@ -1756,10 +1755,8 @@ fluid_settings_option_concat(fluid_settings_t *settings, const char *name, return (NULL); } - setting = &node->str; - /* Duplicate option list, count options and get total string length */ - for(p = setting->options, count = 0, len = 0; p; p = p->next, count++) + for(p = node->str.options, count = 0, len = 0; p; p = p->next) { option = fluid_list_get(p); @@ -1767,6 +1764,7 @@ fluid_settings_option_concat(fluid_settings_t *settings, const char *name, { newlist = fluid_list_append(newlist, option); len += FLUID_STRLEN(option); + count++; } }