fix(os): incorrect usage of _NSGetExecutablePath

This commit is contained in:
phaneron 2023-08-23 19:07:38 -04:00
parent 437cd3bca1
commit 9c7aadb37e

View file

@ -26,8 +26,9 @@ void OsGetExeName(char* buffer, size_t chars) {
#if defined(WHOA_SYSTEM_MAC) #if defined(WHOA_SYSTEM_MAC)
// Darwin // Darwin
char path[1024] = {0}; char path[1024] = {0};
_NSGetExecutablePath(path, uint32_t(1024)); uint32_t bufsize = 1024;
_NSGetExecutablePath(path, &bufsize);
char actualPath[1024] = {0}; char actualPath[1024] = {0};
realpath(path, actualPath); realpath(path, actualPath);