=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.177 retrieving revision 1.179 diff -u -p -r1.177 -r1.179 --- mandoc/mdoc_macro.c 2015/02/06 01:07:22 1.177 +++ mandoc/mdoc_macro.c 2015/02/06 07:13:14 1.179 @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.177 2015/02/06 01:07:22 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.179 2015/02/06 07:13:14 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012-2015 Ingo Schwarze @@ -1401,6 +1401,13 @@ in_line_eoln(MACRO_PROT_ARGS) n = n->parent; if (n->tok == MDOC_Nm) rew_last(mdoc, mdoc->last->parent); + } + + if (buf[*pos] == '\0' && + (tok == MDOC_Fd || mdoc_macronames[tok][0] == '%')) { + mandoc_msg(MANDOCERR_MACRO_EMPTY, mdoc->parse, + line, ppos, mdoc_macronames[tok]); + return; } mdoc_argv(mdoc, line, tok, &arg, pos, buf);