summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdoc_argv.c2
-rw-r--r--mdoc_validate.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c
index 4466ac67..9d118fa9 100644
--- a/mdoc_argv.c
+++ b/mdoc_argv.c
@@ -81,7 +81,7 @@ static const enum argvflag argvflags[MDOC_ARG_MAX] = {
ARGV_NONE, /* MDOC_Ohang */
ARGV_NONE, /* MDOC_Inset */
ARGV_MULTI, /* MDOC_Column */
- ARGV_SINGLE, /* MDOC_Width */
+ ARGV_OPT_SINGLE, /* MDOC_Width */
ARGV_NONE, /* MDOC_Compact */
ARGV_NONE, /* MDOC_Std */
ARGV_NONE, /* MDOC_Filled */
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 422e4c3a..4c48ad0c 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -661,8 +661,13 @@ pre_bl(PRE_ARGS)
comp = 1;
break;
case (MDOC_Width):
- dup = (NULL != n->norm->Bl.width);
- width = n->args->argv[i].value[0];
+ /* NB: this can be empty! */
+ if (n->args->argv[i].sz) {
+ width = n->args->argv[i].value[0];
+ dup = (NULL != n->norm->Bl.width);
+ break;
+ }
+ mdoc_nmsg(mdoc, n, MANDOCERR_IGNARGV);
break;
case (MDOC_Offset):
/* NB: this can be empty! */