summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mandocdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 4400f2aa..641219c7 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1302,6 +1302,15 @@ parse_man(struct mpage *mpage, const struct man_node *n)
byte = start[sz];
start[sz] = '\0';
+ /*
+ * Assume a stray trailing comma in the
+ * name list if a name begins with a dash.
+ */
+
+ if ('-' == start[0] ||
+ ('\\' == start[0] && '-' == start[1]))
+ break;
+
putkey(mpage, start, TYPE_Nm);
if (' ' == byte) {