nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit ccdb95f3ab4d7fbadcfc09a93fe7f58e77a9d79f
parent b854f396cfa6ac4422e0556c738ebc479b0e1075
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 25 Aug 2017 18:27:06 +0530

mbstowcs() returns the codepoints

Diffstat:
Mnnn.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/nnn.c b/nnn.c @@ -1013,10 +1013,9 @@ xreadline(char *fname) size_t buflen = NAME_MAX - 1; DPRINTF_S(fname) - mbstowcs(buf, fname, NAME_MAX); - len = pos = wcslen(buf); + len = pos = mbstowcs(buf, fname, NAME_MAX); /* For future: handle NULL, say for a new name */ - if (len <= 0) { + if (len == (size_t)-1) { buf[0] = '\0'; len = pos = 0; }