summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/man_term.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mandoc/man_term.c')
-rw-r--r--usr.bin/mandoc/man_term.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index 9c3389d9b1f..074c3b7d257 100644
--- a/usr.bin/mandoc/man_term.c
+++ b/usr.bin/mandoc/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.45 2010/07/25 18:05:54 schwarze Exp $ */
+/* $Id: man_term.c,v 1.46 2010/09/21 22:33:41 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -912,6 +912,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)