diff options
Diffstat (limited to 'src/posix')
-rw-r--r-- | src/posix/filesystem_posix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/posix/filesystem_posix.c b/src/posix/filesystem_posix.c index c5a783c..3bc5458 100644 --- a/src/posix/filesystem_posix.c +++ b/src/posix/filesystem_posix.c @@ -428,7 +428,8 @@ zix_current_path(ZixAllocator* const allocator) #if defined(PATH_MAX) // Some POSIX systems have a static PATH_MAX so we can store it on the stack char buffer[PATH_MAX] = {0}; - return copy_path(allocator, getcwd(buffer, PATH_MAX), strlen(buffer)); + getcwd(buffer, PATH_MAX); + return copy_path(allocator, buffer, strlen(buffer)); #elif USE_PATHCONF // Others don't so we have to query PATH_MAX at runtime to allocate the result |