fix incorrect highlighting when input file starts with line break

Sun, 11 Jun 2023 15:21:44 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 11 Jun 2023 15:21:44 +0200
changeset 71
d5af9261231d
parent 70
60cecca5e484
child 72
b533da8e7411

fix incorrect highlighting when input file starts with line break

src/c2html.c file | annotate | diff | comparison | revisions
     1.1 --- a/src/c2html.c	Sun Jun 11 15:16:48 2023 +0200
     1.2 +++ b/src/c2html.c	Sun Jun 11 15:21:44 2023 +0200
     1.3 @@ -107,7 +107,7 @@
     1.4      /* create the line pointer array */
     1.5      CxList *lines = cxArrayListCreateSimple(CX_STORE_POINTERS, est_cap);
     1.6      cxListAdd(lines, inputbuffer);
     1.7 -    for (size_t i = 1; i < inputbuflen; i++) {
     1.8 +    for (size_t i = 0; i < inputbuflen; i++) {
     1.9          if (inputbuffer[i] == '\n' && i + 1 < inputbuflen) {
    1.10              cxListAdd(lines, inputbuffer + i + 1);
    1.11          }

mercurial