diff options
-rw-r--r-- | mdoc_validate.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 10a628df..35264a13 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1004,12 +1004,14 @@ post_eoln(POST_ARGS) static int post_fname(POST_ARGS) { - const struct mdoc_node *n; - size_t pos; + const struct mdoc_node *n; + const char *cp; + size_t pos; n = mdoc->last->child; pos = strcspn(n->string, "()"); - if (n->string[pos] != '\0') + cp = n->string + pos; + if ( ! (cp[0] == '\0' || (cp[0] == '(' && cp[1] == '*'))) mandoc_msg(MANDOCERR_FN_PAREN, mdoc->parse, n->line, n->pos + pos, n->string); return(1); |