sort: fix a bug when sorting unterminated lines

* src/sort.c (fillbuf): The previous commit incorrectly
terminated the buffer when the last line of input
didn't contain a terminating character.
This commit is contained in:
Pádraig Brady committed 2010-07-15 12:09:33 +01:00
1 parent b084d6bcb5
commit aadc67dfdb
1 file changed
+1 -1
+1 -1
View File
@@ -1743,7 +1743,7 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file)
if (buf->buf == ptrlim)
return false;
if (ptrlim[-1] != eol)
*ptrlim++ = '\0';
*ptrlim++ = eol;
}
}