]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When the last line of a file is missing a newline in -f mode, pass a
authorTim J. Robbins <tjr@FreeBSD.org>
Fri, 5 Nov 2004 10:45:23 +0000 (10:45 +0000)
committerTim J. Robbins <tjr@FreeBSD.org>
Fri, 5 Nov 2004 10:45:23 +0000 (10:45 +0000)
commita2222839a574d4744cb3b23916c55a1ffc398b87
tree032710cccc0519247a199420226398dfab469f4d
parent0acb526b6791db5cb04de5c1912e2e51b8d71922
When the last line of a file is missing a newline in -f mode, pass a
length argument to mbrtowc() that accounts for the terminating newline
character we add automatically. Failing to do this caused the loop to
unexpectedly run out of characters and incorrectly signal an "Illegal byte
sequence" error.
usr.bin/cut/cut.c