and add last missing bit

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1904 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2004-08-17 19:28:54 +00:00
parent c08368bd19
commit 35fb55aba2

View File

@ -290,6 +290,7 @@ ssize_t ngetdelim(char **lineptr, size_t *n, int delim, FILE *stream)
/* Null terminate the buffer. */
null_at(lineptr, indx++);
*n = indx;
/* The last line may not have the delimiter, we have to return what
* we got and the error will be seen on the next iteration. */