summaryrefslogtreecommitdiffstats
path: root/man_macro.c
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@netbsd.org>2011-11-18 16:39:08 +0000
committerJoerg Sonnenberger <joerg@netbsd.org>2011-11-18 16:39:08 +0000
commitb4266fed6f78aed41fddd99ce60e3af6f4a5621c (patch)
tree162148dc5b9040526845bb14f9a66641fdd18e88 /man_macro.c
parent1d7f84eca0e8c3268605b44ee06179bea600c94f (diff)
downloadmandoc-b4266fed6f78aed41fddd99ce60e3af6f4a5621c.tar.gz
Convert an assert into an explicit check. man_unscope can be triggered
on unknown macros.
Diffstat (limited to 'man_macro.c')
-rw-r--r--man_macro.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/man_macro.c b/man_macro.c
index 2aff0f2e..7a9d33b9 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -120,7 +120,8 @@ man_unscope(struct man *m, const struct man_node *to,
assert(to);
- assert(MAN_ROOT != m->last->type);
+ if (MAN_ROOT != m->last->type)
+ return(0);
m->next = MAN_NEXT_SIBLING;
/* LINTED */