win32.c
branch0.4
changeset 10072 e9bd7b46e732
parent 10010 34d95e848b54
child 10073 a1d404ac9820
equal deleted inserted replaced
10071:43992016c7c8 10072:e9bd7b46e732
   777 	FiosItem *fios;
   777 	FiosItem *fios;
   778 	WIN32_FIND_DATA fd;
   778 	WIN32_FIND_DATA fd;
   779 	HANDLE h;
   779 	HANDLE h;
   780 	int sort_start;
   780 	int sort_start;
   781 
   781 
   782 	if (_fios_scn_path == NULL) {
   782 	/* Copy the default path on first run or on 'New Game' */
   783 		_fios_scn_path = malloc(MAX_PATH);
   783 	if (mode == SLD_NEW_GAME || _fios_scn_path == NULL) {
   784 		strcpy(_fios_scn_path, _path.scenario_dir);
   784 		if (_fios_scn_path == NULL) _fios_scn_path = malloc(MAX_PATH);
       
   785 		ttd_strlcpy(_fios_scn_path, _path.scenario_dir, MAX_PATH);
   785 	}
   786 	}
   786 
   787 
   787 	_fios_path = _fios_scn_path;
   788 	_fios_path = _fios_scn_path;
   788 
   789 
   789 	// Parent directory, only if not of the type C:\.
   790 	// Parent directory, only if not of the type C:\.