aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-04-03 14:25:12 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-04-03 14:25:12 +0000
commit1193a9f5cfb0cbb5a35ccca02a5968b39620f1db (patch)
treeba1574822a183020ad34c3f733a1c7b43c976dfd /mdoc_term.c
parentc5cc5653b8df9a14f906682370580c05ea5b20ee (diff)
downloadmandoc-1193a9f5cfb0cbb5a35ccca02a5968b39620f1db.tar.gz
mandoc-1193a9f5cfb0cbb5a35ccca02a5968b39620f1db.tar.zst
mandoc-1193a9f5cfb0cbb5a35ccca02a5968b39620f1db.zip
Merged patch by Ingo Schwarze allowing `Xr' to pass through with no arguments (emits warning of course).
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 07cc5ea3..6197f10d 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.112 2010/03/29 19:28:04 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.113 2010/04/03 14:25:12 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -1277,7 +1277,10 @@ termp_xr_pre(DECL_ARGS)
{
const struct mdoc_node *nn;
- assert(n->child && MDOC_TEXT == n->child->type);
+ if (NULL == n->child)
+ return(0);
+
+ assert(MDOC_TEXT == n->child->type);
nn = n->child;
term_word(p, nn->string);