Fixing a duh
This commit is contained in:
parent
7760e11544
commit
aa9ccc724f
@ -174,11 +174,12 @@ static const char *executable_folder(void)
|
|||||||
}
|
}
|
||||||
/* Ugly unportable code! :( */
|
/* Ugly unportable code! :( */
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
unsigned int length = sizeof(path) - 1;
|
size_t length = sizeof(path) - 1;
|
||||||
_NSGetExecutablePath(&path[0], &length);
|
_NSGetExecutablePath(&path[0], &length);
|
||||||
#else
|
#else
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
assert (readlink("/proc/self/exe", &path[0], sizeof(path) - 1) != -1);
|
size_t __attribute__((unused)) length = readlink("/proc/self/exe", &path[0], sizeof(path) - 1);
|
||||||
|
assert(length != -1);
|
||||||
#else
|
#else
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HMODULE hModule = GetModuleHandle(NULL);
|
HMODULE hModule = GetModuleHandle(NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user