mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03: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:
1 parent
b084d6bcb5
commit
aadc67dfdb
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user