summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tbl_html.c3
-rw-r--r--tbl_term.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/tbl_html.c b/tbl_html.c
index 365161b1..38fd777b 100644
--- a/tbl_html.c
+++ b/tbl_html.c
@@ -49,6 +49,9 @@ html_tbl_strlen(const char *p, void *arg)
static size_t
html_tbl_sulen(const struct roffsu *su, void *arg)
{
+ if (su->scale < 0.0)
+ return 0;
+
switch (su->unit) {
case SCALE_FS: /* 2^16 basic units */
return su->scale * 65536.0 / 24.0;
diff --git a/tbl_term.c b/tbl_term.c
index 1d4b0389..ca63bd8d 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -51,7 +51,10 @@ static void tbl_word(struct termp *, const struct tbl_dat *);
static size_t
term_tbl_sulen(const struct roffsu *su, void *arg)
{
- return term_hen((const struct termp *)arg, su);
+ int i;
+
+ i = term_hen((const struct termp *)arg, su);
+ return i > 0 ? i : 0;
}
static size_t