Change rct2_path into a C++ string

Co-authored-by: Ted John <ted@brambles.org>
This commit is contained in:
Michael SteenbeekandTed John authored and GitHub committed 2022-01-05 15:18:25 +01:00
1 parent ca27c2181b
commit ff909cc286
5 files changed
+9 -11

No files matched your search

+1 -1
View File
@@ -379,7 +379,7 @@ static exitcode_t HandleCommandSetRCT2(CommandLineArgEnumerator* enumerator)
auto configPath = env->GetFilePath(OpenRCT2::PATHID::CONFIG);
config_set_defaults();
config_open(configPath.c_str());
String::DiscardDuplicate(&gConfigGeneral.rct2_path, path);
gConfigGeneral.rct2_path = std::string(path);
if (config_save(configPath.c_str()))
{
Console::WriteFormat("Updating RCT2 path to '%s'.", path);