aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-07-01 21:12:00 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-07-01 21:12:00 +0000
commitcfde1d86dc777ba6f45042599f2519baafb74cac (patch)
tree775cad537f88501548ac29eac664dded55b30433 /mdoc_macro.c
parentd746b90cb9ec627434f26fc89fadf2b702e7956d (diff)
downloadmandoc-cfde1d86dc777ba6f45042599f2519baafb74cac.tar.gz
mandoc-cfde1d86dc777ba6f45042599f2519baafb74cac.tar.zst
mandoc-cfde1d86dc777ba6f45042599f2519baafb74cac.zip
Correct handling of trailing punctuation in MDOC_DELIM blk_full HEADs.
The bug was uncovered by SYNOPSIS .Nm as this happened to be the first block with this particular combination of properties. Found the hard way by kristaps@ in NetBSD gcc-contrib(1), fix by me.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 87e5d895..0a8d2c5c 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_macro.c,v 1.88 2010/07/01 15:38:56 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.89 2010/07/01 21:12:00 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -1025,6 +1025,9 @@ blk_full(MACRO_PROT_ARGS)
lac = ARGS_ERROR == ac ? ARGS_PEND : ac;
ac = mdoc_args(m, line, pos, buf, tok, &p);
+ if (ARGS_PUNCT == ac)
+ break;
+
if (ARGS_ERROR == ac)
return(0);