X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/0e2017eae6791396ef69390438420f7e18dda0e0..9c1eaf47face65f05d12c1991f19a92789b433fc:/man_term.c?ds=sidebyside diff --git a/man_term.c b/man_term.c index c7cbea88..f9a02fda 100644 --- a/man_term.c +++ b/man_term.c @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.84 2010/07/23 13:22:35 kristaps Exp $ */ +/* $Id: man_term.c,v 1.85 2010/09/15 14:36:16 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -916,6 +916,10 @@ print_man_foot(struct termp *p, const void *arg) p->rmargin = p->maxrmargin - term_strlen(p, buf); p->offset = 0; + /* term_strlen() can return zero. */ + if (p->rmargin == p->maxrmargin) + p->rmargin--; + if (meta->source) term_word(p, meta->source); if (meta->source)