lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Feb 19, 2014, at 18:45 , Sean Conner wrote:

It was thus said that the Great Craig Barnes once stated:
On 19 February 2014 16:41, René Rebe <> wrote:
Who said it was impossible? A simple loop fixing this issue was presented by

No one did. It was just in reply to:

Amazing how much energy goes into preventing other people to improve something

Your previous patch looks promising.

 It has a bug.  If the "line" read in is LUAL_BUFFERSIZE bytes (or longer)
in size, *and* the byte *at* LUAL_BUFFERSIZE is 0, then the routine returns
a corrupted line.

I think that case is covered, but there is indeed a bug: it returns garbage if there is no newline at the end of the file. So non-C99 platforms would only be supported with the getc loop, … :-/

 ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin | | | |