Sun, 11 Jun 2023 15:21:44 +0200
fix incorrect highlighting when input file starts with line break
src/c2html.c | file | annotate | diff | comparison | revisions |
--- a/src/c2html.c Sun Jun 11 15:16:48 2023 +0200 +++ b/src/c2html.c Sun Jun 11 15:21:44 2023 +0200 @@ -107,7 +107,7 @@ /* create the line pointer array */ CxList *lines = cxArrayListCreateSimple(CX_STORE_POINTERS, est_cap); cxListAdd(lines, inputbuffer); - for (size_t i = 1; i < inputbuflen; i++) { + for (size_t i = 0; i < inputbuflen; i++) { if (inputbuffer[i] == '\n' && i + 1 < inputbuflen) { cxListAdd(lines, inputbuffer + i + 1); }