aboutsummaryrefslogtreecommitdiffstats
path: root/src/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-01-30 02:18:12 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-01-30 02:18:12 +0530
commitb7666a8d5c9aff8d43f57e58d106acf2611b65ff (patch)
tree6a1f36f24a2dd311936da99b6d1b51e262d3abe3 /src/nnn.c
parent94725466a4605dc05b2ada63b8506a5d4940aed2 (diff)
downloadnnn-b7666a8d5c9aff8d43f57e58d106acf2611b65ff.tar.gz
Fix crash while writing selection to file
Diffstat (limited to 'src/nnn.c')
-rw-r--r--src/nnn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 5f3c11e..9bf8e6c 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -818,7 +818,7 @@ static ssize_t selectiontofd(int fd)
if (pos <= lastpos) {
if (write(fd, "\n", 1) != 1)
return pos;
- pbuf += pos + 1;
+ pbuf += len + 1;
}
++pos;
}