From a64dae573af82f0b16393a0142a2676b82ae5b6a Mon Sep 17 00:00:00 2001 From: muemart Date: Tue, 31 Jan 2017 20:41:26 +0100 Subject: [PATCH] Fix data path command line on windows --- src/openrct2/platform/windows.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openrct2/platform/windows.c b/src/openrct2/platform/windows.c index d1e1676fa1..01b499b42c 100644 --- a/src/openrct2/platform/windows.c +++ b/src/openrct2/platform/windows.c @@ -510,17 +510,17 @@ void platform_resolve_openrct_data_path() wchar_t wOutPath[MAX_PATH]; if (gCustomOpenrctDataPath[0] != 0) { - wchar_t *customUserDataPathW = utf8_to_widechar(gCustomOpenrctDataPath); - if (GetFullPathNameW(customUserDataPathW, countof(wOutPath), wOutPath, NULL) == 0) { + wchar_t *customOpenrctDataPathW = utf8_to_widechar(gCustomOpenrctDataPath); + if (GetFullPathNameW(customOpenrctDataPathW, countof(wOutPath), wOutPath, NULL) == 0) { log_fatal("Unable to resolve path '%s'.", gCustomOpenrctDataPath); exit(-1); } utf8 *outPathTemp = widechar_to_utf8(wOutPath); - safe_strcpy(_userDataDirectoryPath, outPathTemp, sizeof(_userDataDirectoryPath)); + safe_strcpy(_openrctDataDirectoryPath, outPathTemp, sizeof(_openrctDataDirectoryPath)); free(outPathTemp); - free(customUserDataPathW); + free(customOpenrctDataPathW); - path_end_with_separator(_userDataDirectoryPath, sizeof(_userDataDirectoryPath)); + path_end_with_separator(_openrctDataDirectoryPath, sizeof(_openrctDataDirectoryPath)); return; } char buffer[MAX_PATH];