diff options
Diffstat (limited to 'man_term.c')
-rw-r--r-- | man_term.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 <kristaps@bsd.lv> * @@ -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) |