mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-08 10:27:41 +00:00
Use strcasecmp in extension checking.
This commit is contained in:
parent
c87e79556d
commit
e2229ec3c3
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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';
|
||||
}
|
||||
|
@ -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';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user