aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-06 18:58:08 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-06 18:58:08 +0530
commit3dbe08aad6f68cc2aa09bdd227b4cf01c5688cc0 (patch)
tree0d2bba4b01094d0c57ba5ea226ee228005cefc8d /src
parentd97d1522694684fc86af8e553c55b10b6321b7b7 (diff)
downloadnnn-3dbe08aad6f68cc2aa09bdd227b4cf01c5688cc0.tar.gz
Fix #486
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 2ca5ee5..9633c46 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -6489,7 +6489,7 @@ static bool setup_config(void)
if (!xdg)
len = strlen(home) + 1 + 21; /* add length of "/.config/nnn/sessions" */
- cfgdir = (char *)malloc(len - 8); /* Subtract length of sessions */
+ cfgdir = (char *)malloc(len);
plugindir = (char *)malloc(len);
sessiondir = (char *)malloc(len);
if (!cfgdir || !plugindir || !sessiondir) {