Changeset - r4235:925e64eac6dd
[Not reviewed]
master
0 1 0
Darkvater - 18 years ago 2006-08-07 09:32:29
darkvater@openttd.org
(svn r5800) - Fix: When directories were changed in 'Play Scenario', pressing 'New Game' showed scenarios from that directory, not the default one. Bug has been present for a pretty long time, weird nobody noticed this.
1 file changed with 6 insertions and 5 deletions:
fios.c
6
5
0 comments (0 inline, 0 general)
fios.c
Show inline comments
 
@@ -357,14 +357,15 @@ static byte FiosGetScenarioListCallback(
 
 */
 
FiosItem *FiosGetScenarioList(int mode)
 
{
 
	static char *_fios_scn_path = NULL;
 
	static char *fios_scn_path = NULL;
 

	
 
	if (_fios_scn_path == NULL) {
 
		_fios_scn_path = malloc(MAX_PATH);
 
		ttd_strlcpy(_fios_scn_path, _path.scenario_dir, MAX_PATH);
 
	/* Copy the default path on first run or on 'New Game' */
 
	if (mode == SLD_NEW_GAME || fios_scn_path == NULL) {
 
		if (fios_scn_path == NULL) fios_scn_path = malloc(MAX_PATH);
 
		ttd_strlcpy(fios_scn_path, _path.scenario_dir, MAX_PATH);
 
	}
 

	
 
	_fios_path = _fios_scn_path;
 
	_fios_path = fios_scn_path;
 

	
 
	return FiosGetFileList(mode, &FiosGetScenarioListCallback);
 
}
0 comments (0 inline, 0 general)