Explorar el Código

mbstowcs() returns the codepoints

master
Arun Prakash Jana hace 7 años
padre
commit
ccdb95f3ab
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: A75979F35C080412
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. +2
    -3
      nnn.c

+ 2
- 3
nnn.c Ver fichero

@@ -1013,10 +1013,9 @@ xreadline(char *fname)
size_t buflen = NAME_MAX - 1; size_t buflen = NAME_MAX - 1;


DPRINTF_S(fname) 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 */ /* For future: handle NULL, say for a new name */
if (len <= 0) {
if (len == (size_t)-1) {
buf[0] = '\0'; buf[0] = '\0';
len = pos = 0; len = pos = 0;
} }


Cargando…
Cancelar
Guardar