Use strcasecmp in extension checking.

This commit is contained in:
Themaister 2013-04-30 23:58:32 +02:00
parent c87e79556d
commit e2229ec3c3
3 changed files with 5 additions and 5 deletions

View File

@ -146,7 +146,7 @@ bool string_list_find_elem(const struct string_list *list, const char *elem)
for (size_t i = 0; i < list->size; i++)
{
if (strcmp(list->elems[i].data, elem) == 0)
if (strcasecmp(list->elems[i].data, elem) == 0)
return true;
}
@ -163,8 +163,8 @@ bool string_list_find_elem_prefix(const struct string_list *list, const char *pr
for (size_t i = 0; i < list->size; i++)
{
if (strcmp(list->elems[i].data, elem) == 0 ||
strcmp(list->elems[i].data, prefixed) == 0)
if (strcasecmp(list->elems[i].data, elem) == 0 ||
strcasecmp(list->elems[i].data, prefixed) == 0)
return true;
}

View File

@ -2001,7 +2001,7 @@ static bool directory_parse(rgui_handle_t *rgui, const char *directory, unsigned
{
exts = ext_buf;
if (*rgui->info.valid_extensions)
snprintf(ext_buf, sizeof(ext_buf), "%s|zip|ZIP", rgui->info.valid_extensions);
snprintf(ext_buf, sizeof(ext_buf), "%s|zip", rgui->info.valid_extensions);
else
*ext_buf = '\0';
}

View File

@ -2479,7 +2479,7 @@ static int select_rom(void *data, uint64_t input)
{
ext = ext_buf;
if (*rgui->info.valid_extensions)
snprintf(ext_buf, sizeof(ext_buf), "%s|zip|ZIP", rgui->info.valid_extensions);
snprintf(ext_buf, sizeof(ext_buf), "%s|zip", rgui->info.valid_extensions);
else
*ext_buf = '\0';
}