summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/roff.c b/roff.c
index 3e298ae0..8ed21a8f 100644
--- a/roff.c
+++ b/roff.c
@@ -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);
}