]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix segfault when last dir is not set
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 11 Jun 2022 00:35:57 +0000 (06:05 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 11 Jun 2022 00:35:57 +0000 (06:05 +0530)
src/nnn.c

index 0a291251c6010fc1d3e77844651a9629d485324f..fddcf15317050afacc2f73e0978fae8ec5d687cc 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -7143,7 +7143,7 @@ nochange:
                                }
 
                                if (strcmp(path, newpath) == 0) {
-                                       if (bookmark)
+                                       if (bookmark || !*lastdir)
                                                break;
 
                                        dir = lastdir; /* Go to last dir on bookmark key repeat */