diff options
author | Joerg Sonnenberger <joerg@netbsd.org> | 2011-11-18 16:39:08 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@netbsd.org> | 2011-11-18 16:39:08 +0000 |
commit | b4266fed6f78aed41fddd99ce60e3af6f4a5621c (patch) | |
tree | 162148dc5b9040526845bb14f9a66641fdd18e88 /man_macro.c | |
parent | 1d7f84eca0e8c3268605b44ee06179bea600c94f (diff) | |
download | mandoc-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.c | 3 |
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 */ |