mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 10:30:28 +00:00
(svn r26008) -Fix (r25975): uninitialised warning
This commit is contained in:
parent
a25ecfd982
commit
b934e528d9
@ -1203,12 +1203,14 @@ void DeterminePaths(const char *exe)
|
|||||||
SP_PERSONAL_DIR, SP_BINARY_DIR, SP_WORKING_DIR, SP_SHARED_DIR, SP_INSTALLATION_DIR
|
SP_PERSONAL_DIR, SP_BINARY_DIR, SP_WORKING_DIR, SP_SHARED_DIR, SP_INSTALLATION_DIR
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config_dir = NULL;
|
||||||
for (uint i = 0; i < lengthof(new_openttd_cfg_order); i++) {
|
for (uint i = 0; i < lengthof(new_openttd_cfg_order); i++) {
|
||||||
if (IsValidSearchPath(new_openttd_cfg_order[i])) {
|
if (IsValidSearchPath(new_openttd_cfg_order[i])) {
|
||||||
config_dir = strdup(_searchpaths[new_openttd_cfg_order[i]]);
|
config_dir = strdup(_searchpaths[new_openttd_cfg_order[i]]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
assert(config_dir != NULL);
|
||||||
#endif
|
#endif
|
||||||
_config_file = str_fmt("%sopenttd.cfg", config_dir);
|
_config_file = str_fmt("%sopenttd.cfg", config_dir);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user