diff options
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | roff.c | 6 |
2 files changed, 5 insertions, 3 deletions
@@ -789,6 +789,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { static int mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg) { +#if 0 struct curparse *cp; cp = (struct curparse *)arg; @@ -800,5 +801,6 @@ mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg) fprintf(stderr, ": %s", msg); fputc('\n', stderr); +#endif return(1); } @@ -349,14 +349,14 @@ roff_new_ig(ROFF_ARGS) * Merry fucking Christmas. */ - r->last->end = malloc((size_t)i - ppos + 1); + r->last->end = malloc((size_t)(i - ppos) + 1); if (NULL == r->last->end) { (*r->msg)(MANDOCERR_MEM, r->data, ln, ppos, NULL); return(ROFF_ERR); } - memcpy(r->last->end, &(*bufp)[ppos], (size_t)i - ppos); - r->last->end[(size_t)i - ppos] = '\0'; + memcpy(r->last->end, &(*bufp)[ppos], (size_t)(i - ppos)); + r->last->end[i - ppos] = '\0'; return(ROFF_IGN); } |