summaryrefslogtreecommitdiff
path: root/src/ini_load.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2020-12-06 21:11:42 +0100
committerMichael Lutz <michi@icosahedron.de>2020-12-27 13:19:25 +0100
commitdd138fc460dcbab37452e90ff070a31516994aa2 (patch)
tree170edd04094e997abe891858a8e4753071983fee /src/ini_load.cpp
parent860c270c73048b4930ac8cbebcd60be746eb9782 (diff)
downloadopenttd-dd138fc460dcbab37452e90ff070a31516994aa2.tar.xz
Codechange: Stringify config file paths.
Diffstat (limited to 'src/ini_load.cpp')
-rw-r--r--src/ini_load.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ini_load.cpp b/src/ini_load.cpp
index 93b6bdf72..e7c2b95fe 100644
--- a/src/ini_load.cpp
+++ b/src/ini_load.cpp
@@ -192,7 +192,7 @@ void IniLoadFile::RemoveGroup(const char *name)
* @param subdir the sub directory to load the file from.
* @pre nothing has been loaded yet.
*/
-void IniLoadFile::LoadFromDisk(const char *filename, Subdirectory subdir)
+void IniLoadFile::LoadFromDisk(const std::string &filename, Subdirectory subdir)
{
assert(this->last_group == &this->group);
@@ -204,7 +204,7 @@ void IniLoadFile::LoadFromDisk(const char *filename, Subdirectory subdir)
uint comment_alloc = 0;
size_t end;
- FILE *in = this->OpenFile(filename, subdir, &end);
+ FILE *in = this->OpenFile(filename.c_str(), subdir, &end);
if (in == nullptr) return;
end += ftell(in);