*ret = g_new0(char*, count + 1);
(*ret)[count] = NULL; /* null terminated list */
- for (it = strs; it; it = g_slist_next(it)) {
+ for (i = 0, it = strs; it; ++i, it = g_slist_next(it)) {
(*ret)[i] = g_convert(it->data, -1, "UTF-8", "ISO-8859-1",
NULL, NULL, NULL);
/* make sure translation did not fail */
*ret = g_new0(char*, count + 1);
- for (it = strs; it; it = g_slist_next(it)) {
+ for (i = 0, it = strs; it; ++i, it = g_slist_next(it)) {
if (g_utf8_validate(it->data, -1, NULL))
(*ret)[i] = g_strdup(it->data);
else