From b40c56bdbedafaecb6da31fbbc4bd1cbea08fd75 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 30 Mar 2015 02:29:38 +0200 Subject: [PATCH] (dir_list.c) Fix Salamander --- libretro-common/file/dir_list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libretro-common/file/dir_list.c b/libretro-common/file/dir_list.c index 0690a87339..052c0ebfe4 100644 --- a/libretro-common/file/dir_list.c +++ b/libretro-common/file/dir_list.c @@ -205,6 +205,7 @@ struct string_list *dir_list_new(const char *dir, const char *ext, bool include_dirs) { char path_buf[PATH_MAX_LENGTH]; + int i; struct string_list *ext_list, *list, *dir_list; #ifdef _WIN32 WIN32_FIND_DATA ffd; @@ -236,7 +237,7 @@ struct string_list *dir_list_new(const char *dir, // Process the directory list from the end to the start to have an override // of file from the first directory by the file from the last directory. - for (int i = dir_list->size -1; i >= 0; i--) + for (i = dir_list->size -1; i >= 0; i--) { const char * dir_name = dir_list->elems[i].data; do