Fix crash while writing selection to file

This commit is contained in:
Arun Prakash Jana 2019-01-30 02:18:12 +05:30
parent 94725466a4
commit b7666a8d5c
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -818,7 +818,7 @@ static ssize_t selectiontofd(int fd)
if (pos <= lastpos) { if (pos <= lastpos) {
if (write(fd, "\n", 1) != 1) if (write(fd, "\n", 1) != 1)
return pos; return pos;
pbuf += pos + 1; pbuf += len + 1;
} }
++pos; ++pos;
} }