]> Sergey Matveev's repositories - nnn.git/commitdiff
Let buffer for current path be auto-allocated
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 25 Sep 2020 19:19:33 +0000 (00:49 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 25 Sep 2020 19:20:11 +0000 (00:50 +0530)
src/nnn.c

index 127818d7af05207a23a0b94ba65b109633e36076..c0a211396c594a6f8d2661caae0e28c209b9b1f7 100644 (file)
--- 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 {