Skip to content

Commit 395068d

Browse files
committed
fix 's r' session restore #1968
1 parent 5e5a17f commit 395068d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nnn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4543,7 +4543,7 @@ static bool load_session(const char *sname, char **path, char **lastdir, char **
45434543
*lastdir = g_ctx[cfg.curctx].c_last;
45444544
*lastname = g_ctx[cfg.curctx].c_name;
45454545
set_sort_flags('\0'); /* Set correct sort options */
4546-
xstrsncpy(curssn, sname, NAME_MAX);
4546+
xstrsncpy(curssn, sname ? sname : "@", NAME_MAX);
45474547
status = TRUE;
45484548

45494549
END:

0 commit comments

Comments
 (0)