Tony Balinski wrote:

>     if (lineIndex >= lineLen)
>         style = FILL_MASK;
>     if (styleBuf != NULL) { /* ---------------- NOTE: NO ELSE */
>         /* pick up styleBuf's style value separately */
>         int styleChar = (unsigned char)BufGetCharacter(styleBuf, pos);
>         if (styleChar == textD->unfinishedStyle) {
>             /* encountered "unfinished" style, trigger parsing */
>             (textD->unfinishedHighlightCB)(textD, pos, textD->highlightCBArg);
>             styleChar = (unsigned char)BufGetCharacter(styleBuf, pos);
>         }
>         style |= styleChar; /* add styleBuf value found to style bitmap */
>     }

A small correction:  Deleting the 'else' may lead to segfaults,
because textD->highlightCBArg may be NULL, see help.c for instance. 
So, we need

if (styleBuf != NULL && textD->highlightCBArg != NULL)


Jörg
--
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop

Reply via email to