We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 09ab377 + 919d67c commit ea5a9a8Copy full SHA for ea5a9a8
1 file changed
jsrc/jeload.cpp
@@ -97,7 +97,6 @@ jeload(void* callbacks) -> J {
97
auto
98
jepath(char* arg, char* lib) -> void {
99
uint32_t const sz = 4000;
100
- uint32_t len = sz; // Cant be const for function call _NSGetExecutablePath
101
102
// C strings need to be used for POSIX APIs and macOS APIs
103
auto arg2 = new char[sz];
@@ -109,6 +108,7 @@ jepath(char* arg, char* lib) -> void {
109
108
// try host dependent way to get path to executable
110
// use arg if they fail (arg command in PATH won't work)
111
#ifdef __MACH__
+ uint32_t len = sz; // Cant be const for function call _NSGetExecutablePath
112
// Returns 0 if path was copied, otherwise -1 if failed.
113
if (_NSGetExecutablePath(arg2, &len) != 0) strcat(arg2, arg);
114
#else
0 commit comments