elventear/sais-lite-lcp — pull request #1 by jeffdaily (2014-05-16 22:15:04+00:00)
Title:  LCP[0]=0 is always 0

The suftest.c test program reads a file from the command line. The entire file is read, including possibly the EOF. When attempting to use the sais routine directly, outside of the suftest.c program, certain inputs would cause an assertion on line 469 because lcp=LCP[0] might not be 0.

For example, the input 'acaaacatat|' (yes, that is a pipe '|' character) would cause the assertion. This was easy to overlook since the suftest.c program contained a non-printable whitespace character, e.g., EOF and would avoid this problem naturally having set LCP[0]=0 much earlier.