Fix selection in /

This commit is contained in:
Arun Prakash Jana 2021-07-16 11:09:20 +05:30
parent fa0f9ddc93
commit 26f44f0dfc
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 2 additions and 1 deletions

View File

@ -1752,8 +1752,9 @@ static void rmfromselbuf(size_t len)
static int scanselforpath(const char *path, bool getsize)
{
if (!path[1]) { /* path should always be at least two bytes (including NULL) */
g_buf[0] = '/';
findselpos = pselbuf;
return TRUE;
return 1; /* Length of '/' is 1 */
}
size_t off = xstrsncpy(g_buf, path, PATH_MAX);