summaryrefslogtreecommitdiffstats
path: root/man.c
diff options
context:
space:
mode:
Diffstat (limited to 'man.c')
-rw-r--r--man.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/man.c b/man.c
index 1ad78a55..374f50e9 100644
--- a/man.c
+++ b/man.c
@@ -595,9 +595,12 @@ man_pmacro(struct man *man, int ln, char *buf, int offs)
/* In quick mode (for mandocdb), abort after the NAME section. */
- if (man->quick && MAN_SH == tok &&
- strcmp(man->last->prev->child->string, "NAME"))
- return(2);
+ if (man->quick && MAN_SH == tok) {
+ n = man->last;
+ if (MAN_BODY == n->type &&
+ strcmp(n->prev->child->string, "NAME"))
+ return(2);
+ }
/*
* We weren't in a block-line scope when entering the