summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2020-12-06 21:11:44 +0100
committerMichael Lutz <michi@icosahedron.de>2020-12-27 13:19:25 +0100
commitf3326d34e78bd28fba6d8cfd3bc455a506b429fe (patch)
tree307a0608a7fb1c211fd72a8b8326cfe9bb1d37a2 /src/strings.cpp
parent0c6e8a8123c9f74db757272f73adcbd8621e012d (diff)
downloadopenttd-f3326d34e78bd28fba6d8cfd3bc455a506b429fe.tar.xz
Codechange: Use std::string in FIO search path handling.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index ae0ab2c90..9f61ea5fd 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -1959,9 +1959,8 @@ void InitializeLanguagePacks()
Searchpath sp;
FOR_ALL_SEARCHPATHS(sp) {
- char path[MAX_PATH];
- FioAppendDirectory(path, lastof(path), sp, LANG_DIR);
- GetLanguageList(path);
+ std::string path = FioGetDirectory(sp, LANG_DIR);
+ GetLanguageList(path.c_str());
}
if (_languages.size() == 0) usererror("No available language packs (invalid versions?)");