lcc icon indicating copy to clipboard operation
lcc copied to clipboard

lburg - fix strchr when buffer doesn't have an eol.

Open ksherlock opened this issue 10 years ago • 0 comments

if strchr(bp, '\n') didn't find anything the first time, it won't find anything the second time, either. Change to'\0' to find the end-of-line. It's still a syntax error (the grammar requires a '\n') but it won't cause an alloc error.

This is only an issue if there's no end-of-line while lexing a rule's cost code (so not a problem with any of lcc's files).

ksherlock avatar Mar 20 '15 19:03 ksherlock