From 42f2a8d289eb7d8694b5c542feee25046ab64a6c Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 16 Apr 2022 15:46:05 -0700 Subject: [PATCH] Maybe fix mac idk --- src/pc/mods/mods_utils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pc/mods/mods_utils.c b/src/pc/mods/mods_utils.c index 3de5efc7..b42fcc9d 100644 --- a/src/pc/mods/mods_utils.c +++ b/src/pc/mods/mods_utils.c @@ -174,14 +174,14 @@ const char* path_to_executable(void) { #if defined(_WIN32) || defined(_WIN64) HMODULE hModule = GetModuleHandle(NULL); if (hModule == NULL) { - LOG_ERROR("unable to retrieve absolute exe path!"); + LOG_ERROR("unable to retrieve absolute windows path!"); return NULL; } GetModuleFileName(hModule, exePath, SYS_MAX_PATH-1); #elif defined(OSX_BUILD) u32 bufsize = SYS_MAX_PATH-1; - if (!_NSGetExecutablePath(exePath, &bufsize)) { - LOG_ERROR("unable to retrieve absolute exe path!"); + if (_NSGetExecutablePath(exePath, &bufsize) != 0) { + LOG_ERROR("unable to retrieve absolute mac path!"); return NULL; } #else @@ -189,7 +189,7 @@ const char* path_to_executable(void) { snprintf(procPath, SYS_MAX_PATH-1, "/proc/%d/exe", getpid()); s32 rc = readlink(procPath, exePath, SYS_MAX_PATH-1); if (rc <= 0) { - LOG_ERROR("unable to retrieve absolute exe path!"); + LOG_ERROR("unable to retrieve absolute linux path!"); return NULL; } #endif