aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'validate.c')
-rw-r--r--validate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/validate.c b/validate.c
index f105064a..6a22f634 100644
--- a/validate.c
+++ b/validate.c
@@ -1,4 +1,4 @@
-/* $Id: validate.c,v 1.31 2009/01/16 11:50:54 kristaps Exp $ */
+/* $Id: validate.c,v 1.32 2009/01/16 12:23:25 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -306,7 +306,8 @@ pre_display(struct mdoc *mdoc, struct mdoc_node *node)
if (MDOC_BLOCK != node->type)
return(1);
- for (n = mdoc->last; n; n = n->parent)
+ assert(mdoc->last);
+ for (n = mdoc->last->parent; n; n = n->parent)
if (MDOC_BLOCK == n->type)
if (MDOC_Bd == n->tok)
break;