mirror of https://github.com/OpenRCT2/OpenRCT2.git
fix realpath() return value in platform_resolve_openrct_data_path
realpath() returns NULL on error, so the existing code treated its success as a critical error. this commit fixes this.
This commit is contained in:
parent
43ec7febff
commit
2894bea5dd
|
@ -697,8 +697,8 @@ void platform_get_openrct_data_path(utf8 *outPath, size_t outSize)
|
|||
void platform_resolve_openrct_data_path()
|
||||
{
|
||||
if (gCustomOpenrctDataPath[0] != 0) {
|
||||
if (realpath(gCustomOpenrctDataPath, _openrctDataDirectoryPath)) {
|
||||
log_error("Could not resolve path \"%s\"", gCustomOpenrctDataPath);
|
||||
if (realpath(gCustomOpenrctDataPath, _openrctDataDirectoryPath) == NULL) {
|
||||
log_error("Could not resolve path \"%s\", errno = %d", gCustomOpenrctDataPath, errno);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue