and add last missing bit

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1904 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-08-17 19:28:54 +00:00
parent c08368bd19
commit 35fb55aba2
1 changed files with 1 additions and 0 deletions

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. */