From 63ed1f431a924feaf23069c7881c2520fbc991ae Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 2 Jul 2010 13:12:47 +0000 Subject: Fix: was checking HEAD for arguments. --- mdoc_validate.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mdoc_validate.c') diff --git a/mdoc_validate.c b/mdoc_validate.c index 4f060978..dd70ed96 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -957,6 +957,8 @@ post_bf(POST_ARGS) } np = mdoc->last; + assert(MDOC_BLOCK == np->parent->type); + assert(MDOC_Bf == np->parent->tok); np->data.Bf = mandoc_calloc(1, sizeof(struct mdoc_bf)); /* @@ -964,16 +966,16 @@ post_bf(POST_ARGS) * If neither is specified, let it through with a warning. */ - if (np->args && np->child) { + if (np->parent->args && np->child) { mdoc_nmsg(mdoc, np, MANDOCERR_SYNTARGVCOUNT); return(0); - } else if (NULL == np->args && NULL == np->child) + } else if (NULL == np->parent->args && NULL == np->child) return(mdoc_nmsg(mdoc, np, MANDOCERR_FONTTYPE)); /* Extract argument into data. */ - if (np->args) { - arg = np->args->argv[0].arg; + if (np->parent->args) { + arg = np->parent->args->argv[0].arg; if (MDOC_Emphasis == arg) np->data.Bf->font = FONT_Em; else if (MDOC_Literal == arg) -- cgit