summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mandoc/term.c')
-rw-r--r--usr.bin/mandoc/term.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/mandoc/term.c b/usr.bin/mandoc/term.c
index 21443c7111e..76836aac3ef 100644
--- a/usr.bin/mandoc/term.c
+++ b/usr.bin/mandoc/term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: term.c,v 1.100 2014/12/23 13:48:15 schwarze Exp $ */
+/* $OpenBSD: term.c,v 1.101 2014/12/24 09:57:41 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -771,6 +771,7 @@ int
term_vspan(const struct termp *p, const struct roffsu *su)
{
double r;
+ int ri;
switch (su->unit) {
case SCALE_BU:
@@ -806,7 +807,8 @@ term_vspan(const struct termp *p, const struct roffsu *su)
abort();
/* NOTREACHED */
}
- return(r > 0.0 ? r + 0.4995 : r - 0.4995);
+ ri = r > 0.0 ? r + 0.4995 : r - 0.4995;
+ return(ri < 66 ? ri : 1);
}
int