1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-14 23:33:38 +00:00

Fixed issue related to Apple Silicon

This commit is contained in:
Bryan Roe
2020-12-07 18:00:17 -08:00
parent 462fa965ae
commit dfaf7909b3
2 changed files with 3 additions and 3 deletions

View File

@@ -433,7 +433,7 @@ void ILibDuktape_ScriptContainer_CheckEmbedded(char **script, int *scriptLen)
#ifndef __APPLE__
char exePath[_MAX_PATH*2];
#else
char exePath[PATH_MAX+1];
char exePath[PATH_MAX+1] = {0};
#endif
#ifdef WIN32
@@ -443,7 +443,7 @@ void ILibDuktape_ScriptContainer_CheckEmbedded(char **script, int *scriptLen)
#elif defined(__APPLE__)
uint32_t len = sizeof(exePath);
if (_NSGetExecutablePath(exePath, &len) != 0) ILIBCRITICALEXIT(247);
exePath[len] = 0;
#elif defined(NACL)
#elif defined(_FREEBSD)
int x = readlink("/proc/curproc/file", exePath, sizeof(exePath));