Ver código fonte

Clear buffer for no locale compilation

master
Arun Prakash Jana 5 anos atrás
pai
commit
8a7d2bd1ed
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: A75979F35C080412
1 arquivos alterados com 5 adições e 0 exclusões
  1. +5
    -0
      src/nnn.c

+ 5
- 0
src/nnn.c Ver arquivo

@@ -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);



Carregando…
Cancelar
Salvar