1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-25 18:19:00 +02:00

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
2010-07-15 12:06:04 +01:00
parent b084d6bcb5
commit aadc67dfdb
+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;
}
}