aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/html.c b/html.c
index fef0aa0d..4bb3ca56 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.212 2017/05/14 12:27:28 schwarze Exp $ */
+/* $Id: html.c,v 1.213 2017/06/08 12:54:58 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -950,7 +950,10 @@ print_word(struct html *h, const char *cp)
static void
a2width(const char *p, struct roffsu *su)
{
- if (a2roffsu(p, su, SCALE_MAX) < 2) {
+ const char *end;
+
+ end = a2roffsu(p, su, SCALE_MAX);
+ if (end == NULL || *end != '\0') {
su->unit = SCALE_EN;
su->scale = html_strlen(p);
} else if (su->scale < 0.0)