mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 12:33:17 +01:00
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:
committed by
Michał Janiszewski
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user