diff options
author | Pádraig Brady <P@draigBrady.com> | 2010-07-15 12:06:04 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2010-07-15 12:09:33 +0100 |
commit | aadc67dfdb47f28bb8d1fa5e0fe0f52e2a8c51bf (patch) | |
tree | b0135f5df47426ab67ab7e936c22ad94db0870d2 /src | |
parent | b084d6bcb51ddb19c6febe3c3ab343b89efdd2f2 (diff) | |
download | coreutils-aadc67dfdb47f28bb8d1fa5e0fe0f52e2a8c51bf.tar.xz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/sort.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sort.c b/src/sort.c index 45cb78f0a..7d318788c 100644 --- a/src/sort.c +++ b/src/sort.c @@ -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; } } |