From bb7b7c0e149f0651073ef4f2280f351117f5aa6d Mon Sep 17 00:00:00 2001 From: Darkvater Date: Thu, 10 Mar 2005 21:44:17 +0000 Subject: (svn r1986) - Fix: free _config_file when shutting down openttd. Strange that Valgrind didn't catch this, kudos to TrueLight - Feature (small): new command-line option -c . You can have OpenTTD load alternative config files with this setup, handy for servers, or for saves from other players if you don't want to rename your own config. This will have to do until all game-related settings are saved ingame. Couldn't find the SF patch, so credits to the guy that wrote it. --- unix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'unix.c') diff --git a/unix.c b/unix.c index 5c5b4db8e..6ff092b64 100644 --- a/unix.c +++ b/unix.c @@ -515,7 +515,10 @@ void DeterminePaths(void) _path.scenario_dir = str_fmt("%sscenario", _path.personal_dir); _path.gm_dir = str_fmt("%sgm/", _path.game_data_dir); _path.data_dir = str_fmt("%sdata/", _path.game_data_dir); - _config_file = str_fmt("%sopenttd.cfg", _path.personal_dir); + + if (_config_file == NULL) + _config_file = str_fmt("%sopenttd.cfg", _path.personal_dir); + _highscore_file = str_fmt("%shs.dat", _path.personal_dir); _log_file = str_fmt("%sopenttd.log", _path.personal_dir); -- cgit v1.2.3-54-g00ecf