Ramkumar Ramachandra wrote:
quoted
On Thursday 28 July 2011 18:52:30 Ramkumar Ramachandra wrote:
quoted
quoted
+ for (p = buf.buf; *p; p = strchr(p, '\n') + 1) {
[...]
Yes, that was intentional. Every editor I know of inserts a '\n' at
the end of the last line, and I've seen some applications warn/ break
when the last line is not terminated with '\n'. I suppose another
reason to not change this is consistency -- we don't have to handle
the last line using a special case. So, I personally don't like it,
but I'll add a special case if you insist.
What is the failure mode? If it is a baffling segfault, then I
insist.