aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-09-26 00:49:33 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-09-26 00:50:11 +0530
commit55f2a0823a2dea256d24707fdcf44cdf7d6c5670 (patch)
treed3f00030b9c30099365eaf5ff96453586e9195c0
parent2e870f3879eb7b2b2a7e0dce850ae039937d4480 (diff)
downloadnnn-55f2a0823a2dea256d24707fdcf44cdf7d6c5670.tar.gz
Let buffer for current path be auto-allocated
-rw-r--r--src/nnn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 127818d..c0a2113 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -7657,7 +7657,7 @@ int main(int argc, char *argv[])
session = NULL;
} else if (argc == optind) {
/* Start in the current directory */
- initpath = getcwd(NULL, PATH_MAX);
+ initpath = getcwd(NULL, 0);
if (!initpath)
initpath = "/";
} else {