summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-06 03:38:45 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-06 03:38:45 +0000
commitf1b8e7051e92af5f6c90c234ea75598ee7976318 (patch)
treee89f39da84ae391f6274db2c8a96f024fdf27709 /mdoc_macro.c
parent5c488f049fc8ba35c593e62595b53c5e7baf56f8 (diff)
downloadmandoc-f1b8e7051e92af5f6c90c234ea75598ee7976318.tar.gz
better handle .Fo and .Fd without argument
better handle .Fo with more than one argument
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index dc710030..c22e61a1 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1403,6 +1403,12 @@ in_line_eoln(MACRO_PROT_ARGS)
rew_last(mdoc, mdoc->last->parent);
}
+ if (buf[*pos] == '\0' && tok == MDOC_Fd) {
+ mandoc_msg(MANDOCERR_MACRO_EMPTY, mdoc->parse,
+ line, ppos, "Fd");
+ return;
+ }
+
mdoc_argv(mdoc, line, tok, &arg, pos, buf);
mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
if (parse_rest(mdoc, tok, line, pos, buf))