From 4eae58edd3e7513123fbda38e54a262da4a0a9f5 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Thu, 27 Feb 2020 21:41:06 +0530 Subject: [PATCH] Fix filename truncation if O_NOLOC set --- src/nnn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nnn.c b/src/nnn.c index 1d031601..44450e2e 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -2994,7 +2994,7 @@ static wchar_t *unescape(const char *str, uint maxcols) size_t lencount = 0; #ifdef NOLOCALE - memset(wbuf, 0, sizeof(NAME_MAX + 1)); + memset(wbuf, 0, sizeof(NAME_MAX + 1) * sizeof(wchar_t)); #endif /* Convert multi-byte to wide char */