Explorar el Código

Fix null terminator in getline()

master
Nathaniel Walizer hace 10 meses
padre
commit
719f51aa12
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      src/compat.c

+ 1
- 1
src/compat.c Ver fichero

@@ -45,7 +45,7 @@ ssize_t getline(char **restrict lineptr, size_t *restrict n,
if ('\n' == chr) break;
}

ptr[len] = '\0';
*ptr = '\0';

return (len == 0 ? -1 : len);
}


Cargando…
Cancelar
Guardar