summaryrefslogtreecommitdiff
path: root/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'strings.c')
-rw-r--r--strings.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/strings.c b/strings.c
index a38febca5..eb859f600 100644
--- a/strings.c
+++ b/strings.c
@@ -1228,10 +1228,11 @@ static int GetLanguageList(char **languages, int max)
dir = opendir(_path.lang_dir);
if (dir != NULL) {
while ((dirent = readdir(dir)) != NULL) {
- char *t = strrchr(dirent->d_name, '.');
+ const char *d_name = FS2OTTD(dirent->d_name);
+ char *t = strrchr(d_name, '.');
if (t != NULL && strcmp(t, ".lng") == 0) {
- languages[num++] = strdup(dirent->d_name);
+ languages[num++] = strdup(d_name);
if (num == max) break;
}
}