FFPlatform (Linux): tidy

This commit is contained in:
李通洲
2023-12-17 11:46:28 +08:00
parent f91a8aea4d
commit b3484088e9
+1 -1
View File
@@ -20,7 +20,7 @@ static void getExePath(FFPlatform* platform)
FFstrbuf* const exePath = &platform->exePath;
ffStrbufEnsureFree(exePath, PATH_MAX);
#ifdef __linux__
ssize_t exePathLen = readlink("/proc/self/exe", exePath->chars, exePath->allocated);
ssize_t exePathLen = readlink("/proc/self/exe", exePath->chars, exePath->allocated - 1);
#elif defined(__APPLE__)
int exePathLen = proc_pidpath((int) getpid(), exePath->chars, exePath->allocated);
#elif defined(__FreeBSD__)