mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Clear buffer for no locale compilation
This commit is contained in:
parent
94e4dc51ba
commit
8a7d2bd1ed
|
@ -2398,6 +2398,11 @@ static char *unescape(const char *str, uint maxcols, wchar_t **wstr)
|
|||
static wchar_t wbuf[NAME_MAX + 1] __attribute__ ((aligned));
|
||||
wchar_t *buf = wbuf;
|
||||
size_t lencount = 0;
|
||||
|
||||
#ifdef NOLOCALE
|
||||
memset(wbuf, 0, sizeof(wbuf));
|
||||
#endif
|
||||
|
||||
/* Convert multi-byte to wide char */
|
||||
size_t len = mbstowcs(wbuf, str, NAME_MAX);
|
||||
|
||||
|
|
Loading…
Reference in a new issue