aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-11-29 13:02:47 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-11-29 13:02:47 +0000
commita974d4be58d9f1f741b4e1b5e0b69934a2eeacec (patch)
tree9781e2a3539eda2cf81676bf78c987a6491672ef /mdoc_term.c
parent3242f86b1e29a933cc8ab3bd8022d2296d5c5d9b (diff)
downloadmandoc-a974d4be58d9f1f741b4e1b5e0b69934a2eeacec.tar.gz
mandoc-a974d4be58d9f1f741b4e1b5e0b69934a2eeacec.tar.zst
mandoc-a974d4be58d9f1f741b4e1b5e0b69934a2eeacec.zip
Move `Mt', `Ar', and `Li' handling from mdoc_action.c into mdoc_validate.c.
Clarify that `Mt' gets a default `~' (as per groff 1.20) and document it in mdoc.7. Made `Lk' be removed in mdoc_macro.c if it has no arguments. This fixes segfaults in mdoc_{term,html}.c that nobody's managed to raise yet.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 06947fcd..15568dd2 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.194 2010/10/23 23:31:10 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.195 2010/11/29 13:02:47 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -2076,7 +2076,7 @@ termp_lk_pre(DECL_ARGS)
nn = sv = n->child;
- if (NULL == nn->next)
+ if (NULL == nn || NULL == nn->next)
return(1);
for (nn = nn->next; nn; nn = nn->next)