summaryrefslogtreecommitdiffstatshomepage
path: root/mandoc-db.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-04-05 13:12:34 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-04-05 13:12:34 +0000
commite2d9d5d4111a2478d95550439be6ad5d3ba41293 (patch)
treea191923d98db9325d10e468075a75479800607df /mandoc-db.c
parenta17004d9e7c33f14de373887936043703e7435d6 (diff)
downloadmandoc-e2d9d5d4111a2478d95550439be6ad5d3ba41293.tar.gz
mandoc-e2d9d5d4111a2478d95550439be6ad5d3ba41293.tar.zst
mandoc-e2d9d5d4111a2478d95550439be6ad5d3ba41293.zip
Fix type- and NULL-check to be correct node (last, not child). Prevents
segfault in NetBSD.
Diffstat (limited to 'mandoc-db.c')
-rw-r--r--mandoc-db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mandoc-db.c b/mandoc-db.c
index 6fb32435..9396dd0e 100644
--- a/mandoc-db.c
+++ b/mandoc-db.c
@@ -1,4 +1,4 @@
-/* $Id: mandoc-db.c,v 1.6 2011/04/05 13:09:33 kristaps Exp $ */
+/* $Id: mandoc-db.c,v 1.7 2011/04/05 13:12:34 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -546,7 +546,7 @@ pmdoc_Vt(MDOC_ARGS)
return;
if (MDOC_Vt == n->tok && MDOC_BODY != n->type)
return;
- if (NULL == n->child || MDOC_TEXT != n->child->type)
+ if (NULL == n->last || MDOC_TEXT != n->last->type)
return;
/*