diff options
-rw-r--r-- | tbl_html.c | 3 | ||||
-rw-r--r-- | tbl_term.c | 5 |
2 files changed, 7 insertions, 1 deletions
@@ -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; @@ -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 |